'hook function.'

def func(self):

    player = self.player
    if (not self.rhs):
        self.msg('Usage:    @password    <oldpass>    =    <newpass>')
        return
    oldpass = self.lhslist[0]
    newpass = self.rhslist[0]
    if (not player.check_password(oldpass)):
        self.msg("The    specified    old    password    isn't    correct.")
    elif (len(newpass) < 3):
        self.msg('Passwords    must    be    at    least    three    characters    long.')
    else:
        player.set_password(newpass)
        player.save()
        self.msg('Password    changed.')
