diff --git a/game/evennia.py b/game/evennia.py index a42835b352..958786d32f 100755 --- a/game/evennia.py +++ b/game/evennia.py @@ -403,6 +403,7 @@ def error_check_python_modules(): 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")) + if settings.WEBSERVER_ENABLED and not isinstance(settings.WEBSERVER_PORTS[0], tuple): raise DeprecationWarning("settings.WEBSERVER_PORTS must be on the form [(proxyport, serverport), ...]") from src.commands import cmdsethandler if not cmdsethandler.import_cmdset(settings.CMDSET_UNLOGGEDIN, None): print "Warning: CMDSET_UNLOGGED failed to load!" diff --git a/src/server/portal/portal.py b/src/server/portal/portal.py index a39618f6e3..be5b7c1f4b 100644 --- a/src/server/portal/portal.py +++ b/src/server/portal/portal.py @@ -157,10 +157,7 @@ if AMP_ENABLED: from src.server import amp - ifacestr = "" - if AMP_HOST != '127.0.0.1': - ifacestr = "-%s" % AMP_HOST - print ' amp (to Server)%s: %s' % (ifacestr, AMP_PORT) + print ' amp (to Server): %s' % AMP_PORT factory = amp.AmpClientFactory(PORTAL) amp_client = internet.TCPClient(AMP_HOST, AMP_PORT, factory) diff --git a/src/settings_default.py b/src/settings_default.py index 2e4bbed358..13cc9e620e 100644 --- a/src/settings_default.py +++ b/src/settings_default.py @@ -115,7 +115,7 @@ ENCODINGS = ["utf-8", "latin-1", "ISO-8859-1"] # communicate with it. This is an internal functionality of Evennia, usually # operating between two processes on the same machine. You usually don't need to # change this unless you cannot use the default AMP port/host for whatever reason. -AMP_HOST = '127.0.0.1' +AMP_HOST = 'localhost' AMP_PORT = 5000 AMP_INTERFACE = '127.0.0.1' # Caching speeds up all forms of database access, often considerably. There diff --git a/src/utils/idmapper/base.py b/src/utils/idmapper/base.py index c2a7a01280..df110b4ad6 100755 --- a/src/utils/idmapper/base.py +++ b/src/utils/idmapper/base.py @@ -180,10 +180,11 @@ class SharedMemoryModel(Model): super(SharedMemoryModel, cls).save(*args, **kwargs) else: # in another thread; make sure to save in reactor thread + print "saving in another thread!" def _save_callback(cls, *args, **kwargs): super(SharedMemoryModel, cls).save(*args, **kwargs) - blockingCallFromThread(reactor, _save_callback, cls, *args, **kwargs) - #callFromThread(_save_callback, cls, *args, **kwargs) + #blockingCallFromThread(reactor, _save_callback, cls, *args, **kwargs) + callFromThread(_save_callback, cls, *args, **kwargs) # Use a signal so we make sure to catch cascades. def flush_cache(**kwargs):