Fixed a bug with red_button introduced in a previous revision. Resolves issue95.

This commit is contained in:
Griatch 2010-09-02 07:48:39 +00:00
parent 900f6da80f
commit e114c33d8a
4 changed files with 12 additions and 9 deletions

View file

@ -39,20 +39,19 @@ class CmdConnect(MuxCommand):
if not arglist or len(arglist) < 2:
session.msg("\n\r Usage (without <>): connect <email> <password>")
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

View file

@ -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:

View file

@ -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():
"""

View file

@ -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