Fixed bug in @userpassword that still used old 'user' field to look up the password.

This commit is contained in:
Griatch 2014-08-09 18:17:03 +02:00
parent ecc2b11747
commit f25d512c30

View file

@ -428,8 +428,8 @@ class CmdNewPassword(MuxCommand):
player = caller.search_player(self.lhs) player = caller.search_player(self.lhs)
if not player: if not player:
return return
player.user.set_password(self.rhs) player.set_password(self.rhs)
player.user.save() player.save()
self.msg("%s - new password set to '%s'." % (player.name, self.rhs)) self.msg("%s - new password set to '%s'." % (player.name, self.rhs))
if player.character != caller: if player.character != caller:
player.msg("%s has changed your password to '%s'." % (caller.name, player.msg("%s has changed your password to '%s'." % (caller.name,