mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 04:02:46 +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)
|
irc.errorNotRegistered(Raise=True)
|
||||||
|
|
||||||
def getOtherUser(irc, msg, args, state):
|
def getOtherUser(irc, msg, args, state):
|
||||||
|
if ircutils.isUserHostmask(args[0]):
|
||||||
|
irc.errorNoUser(args[0])
|
||||||
try:
|
try:
|
||||||
state.args.append(ircdb.users.getUser(args[0]))
|
state.args.append(ircdb.users.getUser(args[0]))
|
||||||
del args[0]
|
del args[0]
|
||||||
@ -283,9 +285,8 @@ def getOtherUser(irc, msg, args, state):
|
|||||||
getHostmask(irc, msg, args, state)
|
getHostmask(irc, msg, args, state)
|
||||||
hostmask = state.args.pop()
|
hostmask = state.args.pop()
|
||||||
state.args.append(ircdb.users.getUser(hostmask))
|
state.args.append(ircdb.users.getUser(hostmask))
|
||||||
except (KeyError, IndexError, callbacks.Error):
|
except (KeyError, callbacks.Error):
|
||||||
# XXX We should eventually give the user here.
|
irc.errorNoUser(name=hostmask)
|
||||||
irc.errorNoUser()
|
|
||||||
|
|
||||||
def _getRe(f):
|
def _getRe(f):
|
||||||
def get(irc, msg, args, state):
|
def get(irc, msg, args, state):
|
||||||
|
Loading…
Reference in New Issue
Block a user