From a6544f2848733fe1b0cb15f1cb8668b11e7dd672 Mon Sep 17 00:00:00 2001 From: Griatch Date: Fri, 12 Apr 2013 13:01:20 +0200 Subject: [PATCH] changed cmdset_default -> cmdset_character and changed the class names to match. Added migrations to properly update default-set cmdset_stores to the new positions (objects created from custom types are not migrated, these should see errors and need to re-point their imports to the new defaults) --- ev.py | 2 +- game/evennia.py | 15 +-- game/gamesrc/commands/examples/cmdset.py | 26 ++-- ...{cmdset_default.py => cmdset_character.py} | 14 +-- src/commands/default/cmdset_player.py | 3 +- src/commands/default/general.py | 41 ------- src/commands/default/muxcommand.py | 2 +- src/commands/default/player.py | 44 ++++++- src/commands/default/tests.py | 6 +- src/objects/admin.py | 2 +- .../migrations/0017_rename_default_cmdsets.py | 111 ++++++++++++++++++ src/objects/objects.py | 2 +- src/players/models.py | 2 +- src/server/server.py | 2 +- src/settings_default.py | 2 +- 15 files changed, 193 insertions(+), 81 deletions(-) rename src/commands/default/{cmdset_default.py => cmdset_character.py} (88%) create mode 100644 src/objects/migrations/0017_rename_default_cmdsets.py diff --git a/ev.py b/ev.py index 03eda085a6..ac6a0b9069 100644 --- a/ev.py +++ b/ev.py @@ -211,7 +211,7 @@ class DefaultCmds(_EvContainer): """ - from src.commands.default.cmdset_default import DefaultCmdSet + from src.commands.default.cmdset_character import CharacterCmdSet from src.commands.default.cmdset_player import PlayerCmdSet from src.commands.default.cmdset_unloggedin import UnloggedinCmdSet from src.commands.default.muxcommand import MuxCommand, MuxPlayerCommand diff --git a/game/evennia.py b/game/evennia.py index b46e95d488..31eb05f276 100755 --- a/game/evennia.py +++ b/game/evennia.py @@ -425,14 +425,15 @@ def error_check_python_modules(): for path in settings.LOCK_FUNC_MODULES: imp(path, split=False) # cmdsets + + deprstring = "settings.%s should be renamed to %s. If defaults are used, their path/classname must be updated (see src/settings_default.py)." + if hasattr(settings, "CMDSET_DEFAULT"): raise DeprecationWarning(deprstring % ("CMDSET_DEFAULT", "CMDSET_CHARACTER")) + if hasattr(settings, "CMDSET_OOC"): raise DeprecationWarning(deprstring % ("CMDSET_OOC", "CMDSET_PLAYER")) + from src.commands import cmdsethandler - cmdsethandler.import_cmdset(settings.CMDSET_UNLOGGEDIN, None) - cmdsethandler.import_cmdset(settings.CMDSET_DEFAULT, None) - if hasattr(settings, "CMDSET_OOC"): - string = "settings.CMDSET_OOC was renamed to CMDSET_PLAYER." - string += "Also default cmdset location in src was renamed (see src.settings_default.py)." - raise DeprecationWarning(string) - cmdsethandler.import_cmdset(settings.CMDSET_PLAYER, None) + if not cmdsethandler.import_cmdset(settings.CMDSET_UNLOGGEDIN, None): print "Warning: CMDSET_UNLOGGED failed to load!" + if not cmdsethandler.import_cmdset(settings.CMDSET_CHARACTER, None): print "Warning: CMDSET_CHARACTER failed to load" + if not cmdsethandler.import_cmdset(settings.CMDSET_PLAYER, None): print "Warning: CMDSET_PLAYER failed to load" # typeclasses imp(settings.BASE_PLAYER_TYPECLASS) imp(settings.BASE_OBJECT_TYPECLASS) diff --git a/game/gamesrc/commands/examples/cmdset.py b/game/gamesrc/commands/examples/cmdset.py index 1fcd2eccda..fba9f44575 100644 --- a/game/gamesrc/commands/examples/cmdset.py +++ b/game/gamesrc/commands/examples/cmdset.py @@ -4,15 +4,15 @@ Example command set template module. To create new commands to populate the cmdset, see examples/command.py. -To extend the default command set: +To extend the character command set: - copy this file up one level to gamesrc/commands and name it something fitting. - - change settings.CMDSET_DEFAULT to point to the new module's - DefaultCmdSet - - import/add commands at the end of DefaultCmdSet's add() method. + - change settings.CMDSET_CHARACTER to point to the new module's + CharacterCmdSet class + - import/add commands at the end of CharacterCmdSet's add() method. -To extend OOC cmdset: - - like default set, but point settings.CMDSET_OOC on your new cmdset. +To extend Player cmdset: + - like character set, but point settings.PLAYER on your new cmdset. To extend Unloggedin cmdset: - like default set, but point settings.CMDSET_UNLOGGEDIN on your new cmdset. @@ -44,29 +44,29 @@ class ExampleCmdSet(CmdSet): This is the only method defined in a cmdset, called during its creation. It should populate the set with command instances. - Here we just add the empty base Command object. It prints some info. + As and example we just add the empty base Command object. It prints some info. """ self.add(Command()) -class DefaultCmdSet(default_cmds.DefaultCmdSet): +class CharacterCmdSet(default_cmds.CharacterCmdSet): """ This is an example of how to overload the default command - set defined in src/commands/default/cmdset_default.py. + set defined in src/commands/default/cmdset_character.py. Here we copy everything by calling the parent, but you can copy&paste any combination of the default command to customize - your default set. Next you change settings.CMDSET_DEFAULT to point + your default set. Next you change settings.CMDSET_CHARACTER to point to this class. """ - key = "DefaultMUX" + key = "DefaultCharacter" def at_cmdset_creation(self): """ Populates the cmdset """ - # calling setup in src.commands.default.cmdset_default - super(DefaultCmdSet, self).at_cmdset_creation() + # calling setup in src.commands.default.cmdset_character + super(CharacterCmdSet, self).at_cmdset_creation() # # any commands you add below will overload the default ones. diff --git a/src/commands/default/cmdset_default.py b/src/commands/default/cmdset_character.py similarity index 88% rename from src/commands/default/cmdset_default.py rename to src/commands/default/cmdset_character.py index ff819c9577..938d38f8bd 100644 --- a/src/commands/default/cmdset_default.py +++ b/src/commands/default/cmdset_character.py @@ -1,18 +1,19 @@ """ -This module ties together all the commands of the default command -set. Note that some commands, such as communication-commands are -instead put in the OOC cmdset. +This module ties together all the commands default Character objects have +available (i.e. IC commands). Note that some commands, such as communication-commands are +instead put on the player level, in the Player cmdset. Player commands remain +available also to Characters. """ from src.commands.cmdset import CmdSet from src.commands.default import general, help, admin, system from src.commands.default import building from src.commands.default import batchprocess -class DefaultCmdSet(CmdSet): +class CharacterCmdSet(CmdSet): """ Implements the default command set. """ - key = "DefaultMUX" + key = "DefaultCharacter" priority = 0 def at_cmdset_creation(self): @@ -21,7 +22,6 @@ class DefaultCmdSet(CmdSet): # The general commands self.add(general.CmdLook()) self.add(general.CmdHome()) - self.add(general.CmdWho()) self.add(general.CmdInventory()) self.add(general.CmdPose()) self.add(general.CmdNick()) @@ -30,8 +30,6 @@ class DefaultCmdSet(CmdSet): self.add(general.CmdGive()) self.add(general.CmdSay()) self.add(general.CmdAccess()) - self.add(general.CmdColorTest()) - self.add(general.CmdSessions()) # The help system self.add(help.CmdHelp()) diff --git a/src/commands/default/cmdset_player.py b/src/commands/default/cmdset_player.py index 2188c04b00..fda6d2f29a 100644 --- a/src/commands/default/cmdset_player.py +++ b/src/commands/default/cmdset_player.py @@ -21,7 +21,7 @@ class PlayerCmdSet(CmdSet): def at_cmdset_creation(self): "Populates the cmdset" - # General commands + # Player-specific commands self.add(player.CmdOOCLook()) self.add(player.CmdIC()) self.add(player.CmdOOC()) @@ -30,6 +30,7 @@ class PlayerCmdSet(CmdSet): self.add(player.CmdQuit()) self.add(player.CmdPassword()) self.add(player.CmdColorTest()) + self.add(player.CmdSessions()) # testing self.add(building.CmdExamine()) diff --git a/src/commands/default/general.py b/src/commands/default/general.py index 52103dd683..0bb33f15f2 100644 --- a/src/commands/default/general.py +++ b/src/commands/default/general.py @@ -377,47 +377,6 @@ class CmdSay(MuxCommand): speech) caller.location.msg_contents(emit_string, exclude=caller) -class CmdSessions(MuxCommand): - """ - check connected session(s) - - Usage: - @sessions - - Lists the sessions currently connected to your account. - - """ - key = "@sessions" - locks = "cmd:all()" - help_category = "General" - - def func(self): - "Implement function" - - # make sure we work on the player, not on the character - player = self.caller - if hasattr(player, "player"): - player = player.player - - sessions = player.get_all_sessions() - - table = [["sessid"], ["host"], ["character"], ["location"]] - for sess in sorted(sessions, key=lambda x:x.sessid): - sessid = sess.sessid - char = player.get_puppet(sessid) - table[0].append(str(sess.sessid)) - table[1].append(str(sess.address[0])) - table[2].append(char and str(char) or "None") - table[3].append(char and str(char.location) or "N/A") - ftable = utils.format_table(table, 5) - string = "" - for ir, row in enumerate(ftable): - if ir == 0: - string += "\n" + "{w%s{n" % ("".join(row)) - else: - string += "\n" + "".join(row) - self.msg(string) - class CmdPose(MuxCommand): """ diff --git a/src/commands/default/muxcommand.py b/src/commands/default/muxcommand.py index 63d32b9b15..d284e32147 100644 --- a/src/commands/default/muxcommand.py +++ b/src/commands/default/muxcommand.py @@ -7,7 +7,7 @@ from src.utils import utils from src.commands.command import Command # limit symbol import for API -__all__ = ("MuxCommand",) +__all__ = ("MuxCommand", "MuxPlayerCommand") class MuxCommand(Command): """ diff --git a/src/commands/default/player.py b/src/commands/default/player.py index 6496284f3c..739fceaaa9 100644 --- a/src/commands/default/player.py +++ b/src/commands/default/player.py @@ -20,7 +20,8 @@ from src.utils import utils, create, search from settings import MAX_NR_CHARACTERS, MULTISESSION_MODE # limit symbol import for API -__all__ = ("CmdOOCLook", "CmdIC", "CmdOOC", "CmdPassword", "CmdQuit", "CmdEncoding", "CmdWho", "CmdColorTest") +__all__ = ("CmdOOCLook", "CmdIC", "CmdOOC", "CmdPassword", "CmdQuit", + "CmdEncoding", "CmdSessions", "CmdWho", "CmdColorTest") # force max nr chars to 1 if mode is 0 or 1 MAX_NR_CHARACTERS = MULTISESSION_MODE < 2 and 1 or MAX_NR_CHARACTERS @@ -281,6 +282,47 @@ class CmdOOC(MuxPlayerCommand): else: raise RuntimeError("Could not unpuppet!") +class CmdSessions(MuxPlayerCommand): + """ + check connected session(s) + + Usage: + @sessions + + Lists the sessions currently connected to your account. + + """ + key = "@sessions" + locks = "cmd:all()" + help_category = "General" + + def func(self): + "Implement function" + + # make sure we work on the player, not on the character + player = self.caller + if hasattr(player, "player"): + player = player.player + + sessions = player.get_all_sessions() + + table = [["sessid"], ["host"], ["character"], ["location"]] + for sess in sorted(sessions, key=lambda x:x.sessid): + sessid = sess.sessid + char = player.get_puppet(sessid) + table[0].append(str(sess.sessid)) + table[1].append(str(sess.address[0])) + table[2].append(char and str(char) or "None") + table[3].append(char and str(char.location) or "N/A") + ftable = utils.format_table(table, 5) + string = "" + for ir, row in enumerate(ftable): + if ir == 0: + string += "\n" + "{w%s{n" % ("".join(row)) + else: + string += "\n" + "".join(row) + self.msg(string) + class CmdWho(MuxPlayerCommand): """ who diff --git a/src/commands/default/tests.py b/src/commands/default/tests.py index 03f147b646..bbe5fc8792 100644 --- a/src/commands/default/tests.py +++ b/src/commands/default/tests.py @@ -122,14 +122,14 @@ class TestGeneral(CommandTest): #self.call(general.CmdQuit(), "", "You are already home") from src.commands.default import help -from src.commands.default.cmdset_default import DefaultCmdSet +from src.commands.default.cmdset_character import CharacterCmdSet class TestHelp(CommandTest): CID = 2 def test_cmds(self): sep = "-"*78 + "\n" - self.call(help.CmdHelp(), "", sep + " Command help entries", cmdset=DefaultCmdSet()) + self.call(help.CmdHelp(), "", sep + " Command help entries", cmdset=CharacterCmdSet()) self.call(help.CmdSetHelp(), "testhelp, General = This is a test", "Topic 'testhelp' was successfully created.") - self.call(help.CmdHelp(), "testhelp", sep + "Help topic for testhelp", cmdset=DefaultCmdSet()) + self.call(help.CmdHelp(), "testhelp", sep + "Help topic for testhelp", cmdset=CharacterCmdSet()) from src.commands.default import system diff --git a/src/objects/admin.py b/src/objects/admin.py index 556ad329aa..81d3f96501 100644 --- a/src/objects/admin.py +++ b/src/objects/admin.py @@ -41,7 +41,7 @@ class ObjectCreateForm(forms.ModelForm): widget=forms.TextInput(attrs={'size':'78'}), help_text="a comma-separated list of text strings checked by certain locks. They are mainly of use for Character objects. Character permissions overload permissions defined on a controlling Player. Most objects normally don't have any permissions defined.") db_cmdset_storage = forms.CharField(label="CmdSet", - initial=settings.CMDSET_DEFAULT, + initial=settings.CMDSET_CHARACTER, required=False, widget=forms.TextInput(attrs={'size':'78'}), help_text="Most non-character objects don't need a cmdset and can leave this field blank.") diff --git a/src/objects/migrations/0017_rename_default_cmdsets.py b/src/objects/migrations/0017_rename_default_cmdsets.py new file mode 100644 index 0000000000..2a3d93d5e4 --- /dev/null +++ b/src/objects/migrations/0017_rename_default_cmdsets.py @@ -0,0 +1,111 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import DataMigration +from django.db import models + +class Migration(DataMigration): + + def forwards(self, orm): + "Write your forwards methods here." + # Note: Remember to use orm['appname.ModelName'] rather than "from appname.models..." + if not db.dry_run: + for obj in orm['objects.ObjectDB'].objects.filter(db_cmdset_storage=u'src.commands.default.cmdset_default.DefaultCmdSet'): + obj.db_cmdset_storage=u'src.commands.default.cmdset_character.CharacterCmdSet' + obj.save() + + def backwards(self, orm): + "Write your backwards methods here." + raise RuntimeError("You cannot revert this migration.") + + models = { + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'objects.alias': { + 'Meta': {'object_name': 'Alias'}, + 'db_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), + 'db_obj': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['objects.ObjectDB']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'objects.objattribute': { + 'Meta': {'object_name': 'ObjAttribute'}, + 'db_date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'db_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), + 'db_lock_storage': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'db_obj': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['objects.ObjectDB']"}), + 'db_value': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'objects.objectdb': { + 'Meta': {'object_name': 'ObjectDB'}, + 'db_cmdset_storage': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), + 'db_date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'db_destination': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'destinations_set'", 'null': 'True', 'to': "orm['objects.ObjectDB']"}), + 'db_home': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'homes_set'", 'null': 'True', 'to': "orm['objects.ObjectDB']"}), + 'db_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), + 'db_location': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'locations_set'", 'null': 'True', 'to': "orm['objects.ObjectDB']"}), + 'db_lock_storage': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'db_permissions': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), + 'db_player': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['players.PlayerDB']", 'null': 'True', 'blank': 'True'}), + 'db_sessid': ('django.db.models.fields.IntegerField', [], {'null': 'True'}), + 'db_typeclass_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'objects.objectnick': { + 'Meta': {'unique_together': "(('db_nick', 'db_type', 'db_obj'),)", 'object_name': 'ObjectNick'}, + 'db_nick': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), + 'db_obj': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['objects.ObjectDB']"}), + 'db_real': ('django.db.models.fields.TextField', [], {}), + 'db_type': ('django.db.models.fields.CharField', [], {'default': "'inputline'", 'max_length': '16', 'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'players.playerdb': { + 'Meta': {'object_name': 'PlayerDB'}, + 'db_cmdset_storage': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), + 'db_date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'db_is_connected': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'db_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), + 'db_lock_storage': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'db_permissions': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), + 'db_typeclass_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) + } + } + + complete_apps = ['objects'] + symmetrical = True diff --git a/src/objects/objects.py b/src/objects/objects.py index 24e592f2fc..b006bc7b3c 100644 --- a/src/objects/objects.py +++ b/src/objects/objects.py @@ -772,7 +772,7 @@ class Character(Object): self.locks.add(";".join(["get:false()", # noone can pick up the character "call:false()"])) # no commands can be called on character from outside # add the default cmdset - self.cmdset.add_default(settings.CMDSET_DEFAULT, permanent=True) + self.cmdset.add_default(settings.CMDSET_CHARACTER, permanent=True) def at_object_creation(self): """ diff --git a/src/players/models.py b/src/players/models.py index b5b156a13d..0d2830564e 100644 --- a/src/players/models.py +++ b/src/players/models.py @@ -147,7 +147,7 @@ class PlayerDB(TypedObject): db_is_connected = models.BooleanField(default=False, verbose_name="is_connected", help_text="If player is connected to game or not") # database storage of persistant cmdsets. db_cmdset_storage = models.CharField('cmdset', max_length=255, null=True, - help_text="optional python path to a cmdset class. If creating a Character, this will default to settings.CMDSET_DEFAULT.") + help_text="optional python path to a cmdset class. If creating a Character, this will default to settings.CMDSET_CHARACTER.") # Database manager objects = manager.PlayerManager() diff --git a/src/server/server.py b/src/server/server.py index 9e975fb1f5..f25de51fb6 100644 --- a/src/server/server.py +++ b/src/server/server.py @@ -133,7 +133,7 @@ class Evennia(object): objects. """ # setting names - settings_names = ("CMDSET_DEFAULT", "CMDSET_PLAYER", "BASE_PLAYER_TYPECLASS", "BASE_OBJECT_TYPECLASS", + settings_names = ("CMDSET_CHARACTER", "CMDSET_PLAYER", "BASE_PLAYER_TYPECLASS", "BASE_OBJECT_TYPECLASS", "BASE_CHARACTER_TYPECLASS", "BASE_ROOM_TYPECLASS", "BASE_EXIT_TYPECLASS", "BASE_SCRIPT_TYPECLASS") # get previous and current settings so they can be compared settings_compare = zip([ServerConfig.objects.conf(name) for name in settings_names], diff --git a/src/settings_default.py b/src/settings_default.py index c5fbb13f0d..e1a45c63f4 100644 --- a/src/settings_default.py +++ b/src/settings_default.py @@ -217,7 +217,7 @@ LOCK_FUNC_MODULES = ("src.locks.lockfuncs",) # Command set used before player has logged in CMDSET_UNLOGGEDIN = "src.commands.default.cmdset_unloggedin.UnloggedinCmdSet" # Default set for logged in player with characters (fallback) -CMDSET_DEFAULT = "src.commands.default.cmdset_default.DefaultCmdSet" +CMDSET_CHARACTER = "src.commands.default.cmdset_character.CharacterCmdSet" # Command set for players without a character (ooc) CMDSET_PLAYER = "src.commands.default.cmdset_player.PlayerCmdSet"