From 0293a2ba0d33b828978818d0bb57ef7952d9d9fb Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sun, 14 Sep 2003 02:45:09 +0000 Subject: [PATCH] Fixed bug in addhostmask. --- src/UserCommands.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/UserCommands.py b/src/UserCommands.py index 942a35632..6734f3dae 100755 --- a/src/UserCommands.py +++ b/src/UserCommands.py @@ -120,9 +120,10 @@ class UserCommands(callbacks.Privmsg): irc.error(msg, conf.replyNoUser) return try: - _ = ircdb.users.getUserId(hostmask) - irc.error(msg, 'That hostmask is already registered.') - return + otherId = ircdb.users.getUserId(hostmask) + if otherId != id: + irc.error(msg, 'That hostmask is already registered.') + return except KeyError: pass if user.checkHostmask(msg.prefix) or user.checkPassword(password):