@internationalizeDocstring
        def password(self, irc, msg, args, user, password, newpassword):
            """[<name>] <old password> <new password>

            Sets the new password for the user specified by <name> to <new
            password>. Obviously this message must be sent to the bot
            privately (not in a channel). If the requesting user is an owner
            user, then <old password> needn't be correct.
            """
            try:
                u = ircdb.users.getUser(msg.prefix)
            except __HOLE__:
                u = None
            if user is None:
                if u is None:
                    irc.errorNotRegistered(Raise=True)
                user = u
            if user.checkPassword(password) or \
               (u and u._checkCapability('owner')):
                user.setPassword(newpassword)
                ircdb.users.setUser(user)
                irc.replySuccess()
            else:
                irc.error(conf.supybot.replies.incorrectAuthentication())
dataset/ETHPy150Open ProgVal/Limnoria/plugins/User/plugin.py/User.set.password