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

View file

@ -279,7 +279,7 @@ class ObjectManager(TypedObjectManager):
if str(ostring).startswith("*"):
# Player search - try to find obj by its player's name
player_string = ostring.lstrip("*")
player_match = self.get_obj_with_player(player_string)
player_match = self.get_object_with_player(player_string)
if player_match is not None:
return [player_match]