Some minor bugfixes.

This commit is contained in:
Griatch 2010-09-12 16:19:02 +00:00
parent 5361bd03d3
commit af89dd1ef7
2 changed files with 5 additions and 4 deletions

View file

@ -535,13 +535,14 @@ class CmdNewPassword(MuxCommand):
return
# the player search also matches 'me' etc.
player = caller.search("*%s" % self.lhs, global_search=True)
if not player:
character = caller.search("*%s" % self.lhs, global_search=True)
if not character:
return
player = character.player
player.user.set_password(self.rhs)
player.user.save()
caller.msg("%s - new password set to '%s'." % (player.name, self.rhs))
if player != caller:
if character != caller:
player.msg("%s has changed your password to '%s'." % (caller.name, self.rhs))
class CmdHome(MuxCommand):