Fixed to handle secure flag properly.

This commit is contained in:
Jeremy Fincher 2003-10-09 05:09:05 +00:00
parent 7b28caba1b
commit aee2b1555b

View File

@ -288,9 +288,13 @@ class UserCommands(callbacks.Privmsg):
irc.error(msg, conf.replyNoUser) irc.error(msg, conf.replyNoUser)
return return
if user.checkPassword(password): if user.checkPassword(password):
try:
user.setAuth(msg.prefix) user.setAuth(msg.prefix)
ircdb.users.setUser(id, user) ircdb.users.setUser(id, user)
irc.reply(msg, conf.replySuccess) 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: else:
irc.error(msg, conf.replyIncorrectAuth) irc.error(msg, conf.replyIncorrectAuth)