Let's just make sure everythings a string.

This commit is contained in:
Jeremy Fincher 2004-07-23 04:08:14 +00:00
parent 370c30a4cf
commit 0c38398a8d

View File

@ -604,13 +604,11 @@ def whois(nick, mask='', prefix=''):
assert isNick(nick), repr(nick) assert isNick(nick), repr(nick)
return IrcMsg(prefix=prefix, command='WHOIS', args=(nick, mask)) return IrcMsg(prefix=prefix, command='WHOIS', args=(nick, mask))
def mode(channel, args=None, prefix=''): def mode(channel, args=(), prefix=''):
if args is None: if isinstance(args, basestring):
args = ()
elif isinstance(args, basestring):
args = (args,) args = (args,)
else: else:
args = tuple(args) args = tuple(map(str, args))
return IrcMsg(prefix=prefix, command='MODE', args=(channel,)+args) return IrcMsg(prefix=prefix, command='MODE', args=(channel,)+args)
def invite(nick, channel, prefix=''): def invite(nick, channel, prefix=''):