mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 06:49:24 +01:00
Fixed unidentify to not require a name/password.
This commit is contained in:
parent
eabd3c8cf5
commit
423e066a19
@ -1024,23 +1024,18 @@ class UserCommands(callbacks.Privmsg):
|
|||||||
return
|
return
|
||||||
|
|
||||||
def unidentify(self, irc, msg, args):
|
def unidentify(self, irc, msg, args):
|
||||||
"""<name> <password>
|
"""takes no arguments
|
||||||
|
|
||||||
Un-identifies the user as <name>.
|
Un-identifies the user.
|
||||||
"""
|
"""
|
||||||
(name, password) = getArgs(args, 2)
|
|
||||||
self._checkNotChannel(irc, msg)
|
|
||||||
try:
|
try:
|
||||||
u = ircdb.users.getUser(name)
|
u = ircdb.users.getUser(msg.prefix)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
irc.error(msg, conf.replyNoUser)
|
irc.error(msg, conf.replyNoUser)
|
||||||
return
|
return
|
||||||
if u.checkPassword(password):
|
|
||||||
u.unsetAuth()
|
u.unsetAuth()
|
||||||
ircdb.users.setUser(name, u)
|
ircdb.users.setUser(name, u)
|
||||||
irc.reply(msg, conf.replySuccess)
|
irc.reply(msg, conf.replySuccess)
|
||||||
else:
|
|
||||||
irc.error(msg, conf.replyIncorrectAuth)
|
|
||||||
|
|
||||||
def whoami(self, irc, msg, args):
|
def whoami(self, irc, msg, args):
|
||||||
"""takes no arguments.
|
"""takes no arguments.
|
||||||
|
Loading…
Reference in New Issue
Block a user