mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 03:33:11 +01:00
getOtherUser shouldn't accept a hostmask (re: bug #1054680)
This commit is contained in:
parent
ca0c0fad49
commit
a1b7b670fb
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user