diff --git a/game/gamesrc/commands/default/unloggedin.py b/game/gamesrc/commands/default/unloggedin.py index 21b511bef8..71b72db7a8 100644 --- a/game/gamesrc/commands/default/unloggedin.py +++ b/game/gamesrc/commands/default/unloggedin.py @@ -39,20 +39,19 @@ class CmdConnect(MuxCommand): if not arglist or len(arglist) < 2: session.msg("\n\r Usage (without <>): connect ") return - uemail = arglist[0] + email = arglist[0] password = arglist[1] # Match an email address to an account. - email_match = PlayerDB.objects.get_player_from_email(uemail) + player = PlayerDB.objects.get_player_from_email(email) # No playername match - if not email_match: - string = "The email '%s' does not match any accounts." % uemail + if not player: + string = "The email '%s' does not match any accounts." % email string += "\n\r\n\rIf you are new you should first create a new account " string += "using the 'create' command." session.msg(string) return # We have at least one result, so we can check the password. - player = email_match if not player.user.check_password(password): session.msg("Incorrect password.") return diff --git a/src/commands/cmdhandler.py b/src/commands/cmdhandler.py index 4781afa5f3..6a8e7260aa 100644 --- a/src/commands/cmdhandler.py +++ b/src/commands/cmdhandler.py @@ -117,7 +117,7 @@ def get_and_merge_cmdsets(caller): # Merge all command sets into one # (the order matters, the higher-prio cmdsets are merged last) cmdset = caller_cmdset - for obj_cmdset in local_objects_cmdsets: + for obj_cmdset in [obj_cmdset for obj_cmdset in local_objects_cmdsets if obj_cmdset]: # Here only, object cmdsets are merged with duplicates=True # (or we would never be able to differentiate between objects) try: diff --git a/src/server/initial_setup.py b/src/server/initial_setup.py index ed6bdc6e17..54bb604b25 100644 --- a/src/server/initial_setup.py +++ b/src/server/initial_setup.py @@ -24,10 +24,10 @@ def create_config_values(): Creates the initial config values. """ ConfigValue.objects.conf("default_home", "2") - ConfigValue.objects.conf("idle_timeout", "3600") + 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") - ConfigValue.objects.conf("site_name", settings.SERVERNAME) def create_connect_screens(): """ diff --git a/src/settings_default.py b/src/settings_default.py index 29c07748ee..e23402b337 100644 --- a/src/settings_default.py +++ b/src/settings_default.py @@ -65,7 +65,11 @@ 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 +# 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. +IDLE_TIMEOUT = 3600 ################################################### # Evennia Database config