mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 11:12:47 +01:00
Fixed to handle secure flag properly.
This commit is contained in:
parent
7b28caba1b
commit
aee2b1555b
@ -288,9 +288,13 @@ class UserCommands(callbacks.Privmsg):
|
||||
irc.error(msg, conf.replyNoUser)
|
||||
return
|
||||
if user.checkPassword(password):
|
||||
user.setAuth(msg.prefix)
|
||||
ircdb.users.setUser(id, user)
|
||||
irc.reply(msg, conf.replySuccess)
|
||||
try:
|
||||
user.setAuth(msg.prefix)
|
||||
ircdb.users.setUser(id, user)
|
||||
irc.reply(msg, conf.replySuccess)
|
||||
except ValueError:
|
||||
irc.error(msg, 'Your secure flag is true and your hostmask '
|
||||
'doesn\'t match any of your known hostmasks.')
|
||||
else:
|
||||
irc.error(msg, conf.replyIncorrectAuth)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user