Fixed bug in addhostmask.

This commit is contained in:
Jeremy Fincher 2003-09-14 02:45:09 +00:00
parent e729b430b6
commit 0293a2ba0d

View File

@ -120,9 +120,10 @@ class UserCommands(callbacks.Privmsg):
irc.error(msg, conf.replyNoUser) irc.error(msg, conf.replyNoUser)
return return
try: try:
_ = ircdb.users.getUserId(hostmask) otherId = ircdb.users.getUserId(hostmask)
irc.error(msg, 'That hostmask is already registered.') if otherId != id:
return irc.error(msg, 'That hostmask is already registered.')
return
except KeyError: except KeyError:
pass pass
if user.checkHostmask(msg.prefix) or user.checkPassword(password): if user.checkHostmask(msg.prefix) or user.checkPassword(password):