Only use ircmsg.whois's mask argument if it's non-empty.

Closes: Sf#3121298
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
This commit is contained in:
James McCoy 2011-12-06 00:08:01 -05:00
parent 4ddfae427f
commit f6f9e654cb

View File

@ -727,7 +727,10 @@ def whois(nick, mask='', prefix='', msg=None):
assert isNick(nick), repr(nick) assert isNick(nick), repr(nick)
if msg and not prefix: if msg and not prefix:
prefix = msg.prefix prefix = msg.prefix
return IrcMsg(prefix=prefix, command='WHOIS', args=(nick, mask), msg=msg) args = (nick,)
if mask:
args = (nick, mask)
return IrcMsg(prefix=prefix, command='WHOIS', args=args, msg=msg)
def names(channel=None, prefix='', msg=None): def names(channel=None, prefix='', msg=None):
if conf.supybot.protocols.irc.strictRfc(): if conf.supybot.protocols.irc.strictRfc():