diff --git a/game/gamesrc/world/connection_screens.py b/game/gamesrc/world/connection_screens.py index 2c86a43505..8698012828 100644 --- a/game/gamesrc/world/connection_screens.py +++ b/game/gamesrc/world/connection_screens.py @@ -1,7 +1,8 @@ # # This module holds textual connection screen definitions. All global # string variables (only) in this module are read by Evennia and -# assumed to define a Connection screen. +# assumed to define a Connection screen. You can change which module is +# used with settings.CONNECTION_SCREEN_MODULE. # # The names of the string variables doesn't matter (except they # shouldn't start with _), but each should hold a string defining a @@ -13,16 +14,18 @@ # either reboot or reload the server to make them available. # -from src.utils import utils +from src.commands.connection_screen import DEFAULT_SCREEN -DEFAULT_SCREEN = \ -"""{b=============================================================={n - Welcome to {gEvennia{n, version %s! - - If you have an existing account, connect to it by typing: - {wconnect {n - If you need to create an account, type (without the <>'s): - {wcreate \"\" {n - - Enter {whelp{n for more info. {wlook{n will re-load this screen. -{b=============================================================={n""" % utils.get_evennia_version() +# from src.utils import utils +# +# CUSTOM_SCREEN = \ +# """{b=============================================================={n +# Welcome to {gEvennia{n, version %s! +# +# If you have an existing account, connect to it by typing: +# {wconnect {n +# If you need to create an account, type (without the <>'s): +# {wcreate \"\" {n +# +# Enter {whelp{n for more info. {wlook{n will re-load this screen. +#{b=============================================================={n""" % utils.get_evennia_version() diff --git a/src/commands/connection_screen.py b/src/commands/connection_screen.py new file mode 100644 index 0000000000..32f532dc55 --- /dev/null +++ b/src/commands/connection_screen.py @@ -0,0 +1,18 @@ +# +# This is Evennia's default connection screen. It is imported +# and run from game/gamesrc/world/connection_screens.py. +# + +from src.utils import utils + +DEFAULT_SCREEN = \ +"""{b=============================================================={n + Welcome to {gEvennia{n, version %s! + + If you have an existing account, connect to it by typing: + {wconnect {n + If you need to create an account, type (without the <>'s): + {wcreate \"\" {n + + Enter {whelp{n for more info. {wlook{n will re-load this screen. +{b=============================================================={n""" % utils.get_evennia_version() diff --git a/src/server/initial_setup.py b/src/server/initial_setup.py index cad270d596..39af49a0f6 100644 --- a/src/server/initial_setup.py +++ b/src/server/initial_setup.py @@ -17,7 +17,7 @@ def create_config_values(): """ Creates the initial config values. """ - ServerConfig.objects.conf("default_home", "2") + ServerConfig.objects.conf("default_home", '2') ServerConfig.objects.conf("site_name", settings.SERVERNAME) ServerConfig.objects.conf("idle_timeout", settings.IDLE_TIMEOUT) @@ -189,14 +189,14 @@ def handle_setup(last_step): create_objects, create_channels, create_system_scripts, - import_MUX_help_files, start_game_time, - create_admin_media_links] + create_admin_media_links, + import_MUX_help_files] if not settings.IMPORT_MUX_HELP: # skip importing of the MUX helpfiles, they are # not interesting except for developers. - del setup_queue[4] + del setup_queue[-1] #print " Initial setup: %s steps." % (len(setup_queue)) diff --git a/src/server/manager.py b/src/server/manager.py index 58e522ce9a..ffbe32babb 100644 --- a/src/server/manager.py +++ b/src/server/manager.py @@ -21,8 +21,10 @@ class ServerConfigManager(models.Manager): conf.delete() elif value != None: conf = self.filter(db_key=key) - if not conf: - conf = self.model(db_key=key) + if conf: + conf = conf[0] + else: + conf = self.model(db_key=key) conf.value = value # this will pickle else: conf = self.filter(db_key=key)