From a1b7b670fb1ffe71831e2ae31dd59dcb8cfd4169 Mon Sep 17 00:00:00 2001 From: James Vega Date: Tue, 26 Oct 2004 18:32:11 +0000 Subject: [PATCH] getOtherUser shouldn't accept a hostmask (re: bug #1054680) --- src/commands.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/commands.py b/src/commands.py index 1439ec344..9916964f9 100644 --- a/src/commands.py +++ b/src/commands.py @@ -275,6 +275,8 @@ def getUser(irc, msg, args, state): irc.errorNotRegistered(Raise=True) def getOtherUser(irc, msg, args, state): + if ircutils.isUserHostmask(args[0]): + irc.errorNoUser(args[0]) try: state.args.append(ircdb.users.getUser(args[0])) del args[0] @@ -283,9 +285,8 @@ def getOtherUser(irc, msg, args, state): getHostmask(irc, msg, args, state) hostmask = state.args.pop() state.args.append(ircdb.users.getUser(hostmask)) - except (KeyError, IndexError, callbacks.Error): - # XXX We should eventually give the user here. - irc.errorNoUser() + except (KeyError, callbacks.Error): + irc.errorNoUser(name=hostmask) def _getRe(f): def get(irc, msg, args, state):