diff --git a/game/gamesrc/commands/default/privileged.py b/game/gamesrc/commands/default/privileged.py index 37c19ab2e4..15b3934735 100644 --- a/game/gamesrc/commands/default/privileged.py +++ b/game/gamesrc/commands/default/privileged.py @@ -10,6 +10,7 @@ from src.server import sessionhandler from src.players.models import PlayerDB from src.scripts.models import ScriptDB from src.objects.models import ObjectDB +from src.config.models import ConfigValue from src.permissions.models import PermissionGroup from src.utils import reloads, create, logger, utils from src.permissions.permissions import has_perm, has_perm_string @@ -92,11 +93,13 @@ class CmdPy(MuxCommand): 'testscript') obj = create.create_object("src.objects.objects.Object", 'testobject') + conf = ConfigValue() # used to access conf values available_vars = {'self':caller, 'me':caller, 'here':caller.location, 'obj':obj, - 'script':script} + 'script':script, + 'config':conf} caller.msg(">>> %s" % pycode) try: ret = eval(pycode, {}, available_vars) diff --git a/src/commands/cmdsethandler.py b/src/commands/cmdsethandler.py index 79f81833dc..b8483fb9a9 100644 --- a/src/commands/cmdsethandler.py +++ b/src/commands/cmdsethandler.py @@ -88,7 +88,7 @@ def import_cmdset(python_path, cmdsetobj, emit_to_obj=None, no_logging=False): try: try: - print "importing %s: CACHED_CMDSETS=%s" % (python_path, CACHED_CMDSETS) + #print "importing %s: CACHED_CMDSETS=%s" % (python_path, CACHED_CMDSETS) wanted_cache_key = python_path cmdsetclass = CACHED_CMDSETS.get(wanted_cache_key, None) errstring = "" @@ -99,7 +99,7 @@ def import_cmdset(python_path, cmdsetobj, emit_to_obj=None, no_logging=False): module = __import__(modulepath, fromlist=[True]) cmdsetclass = module.__dict__[classname] CACHED_CMDSETS[wanted_cache_key] = cmdsetclass - print "cmdset %s found." % wanted_cache_key + #print "cmdset %s found." % wanted_cache_key #instantiate the cmdset (and catch its errors) if callable(cmdsetclass): cmdsetclass = cmdsetclass(cmdsetobj) @@ -164,6 +164,8 @@ class CmdSetHandler(object): # this tracks which mergetypes are actually in play in the stack self.mergetype_stack = ["Union"] self.update() + + #print "cmdsethandler init. id:%s, obj:%s, cmdsetstack:%s " % (id(self), self.obj.key, [cmdset.key for cmdset in self.cmdset_stack]) def __str__(self): "Display current commands" diff --git a/src/server/initial_setup.py b/src/server/initial_setup.py index 064aaaa067..28c62936ed 100644 --- a/src/server/initial_setup.py +++ b/src/server/initial_setup.py @@ -26,8 +26,6 @@ def create_config_values(): ConfigValue.objects.conf("default_home", "2") ConfigValue.objects.conf("site_name", settings.SERVERNAME) ConfigValue.objects.conf("idle_timeout", settings.IDLE_TIMEOUT) - #ConfigValue.objects.conf("money_name_singular", "Credit") - #ConfigValue.objects.conf("money_name_plural", "Credits") def create_connect_screens(): """ diff --git a/src/settings_default.py b/src/settings_default.py index d5f44dc59d..b5fd4e8481 100644 --- a/src/settings_default.py +++ b/src/settings_default.py @@ -65,16 +65,15 @@ LANGUAGE_CODE = 'en-us' # since it creates a lot of help entries that has nothing to do # with what is actually available in the game. IMPORT_MUX_HELP = False -# How long time (seconds) a user may idle before being logged +# How long time (in seconds) a user may idle before being logged # out. This can be set as big as desired. A user may avoid being # thrown off by sending the empty system command 'idle' to the server -# at regular intervals. +# at regular intervals. Set <=0 to deactivate idle timout completely. IDLE_TIMEOUT = 3600 -# The set of encodings tried. A Player object may set an attribute "encoding" on -# itself to match the client used. If not set, or wrong encoding is -# given, this list is tried, in order, aborting on the first match. -# Add sets for languages/regions your players are likely to use. -# (see http://en.wikipedia.org/wiki/Character_encoding) +# If the PlayerAttribute 'encoding' is not set, or wrong encoding is +# given, this list is tried, in order, stopping on the first match. +# Add sets for languages/regions your players are likely to use. (see +# http://en.wikipedia.org/wiki/Character_encoding). ENCODINGS = ["utf-8", "latin-1", "ISO-8859-1"] ################################################### @@ -314,9 +313,10 @@ IRC_NICKNAME = "" # While DEBUG is False, show a regular server error page on the web # stuff, email the traceback to the people in the ADMINS tuple -# below. By default (True), show a detailed traceback for the web -# browser to display. -DEBUG = True +# below. If True, show a detailed traceback for the web +# browser to display. Note however that this might leak memory when +# active, so make sure turn it off for a production server! +DEBUG = False # While true, show "pretty" error messages for template syntax errors. TEMPLATE_DEBUG = DEBUG # Emails are sent to these people if the above DEBUG value is False. If you'd