Stopped possible AttributeError (nick could've been None).

This commit is contained in:
Jeremy Fincher 2005-03-09 10:36:54 +00:00
parent 1f49fc1e3e
commit 69a83e8530

View File

@ -387,7 +387,8 @@ class Channel(callbacks.Plugin):
to join <channel>. <channel> is only necessary if the message isn't
sent in the channel itself.
"""
self._sendMsg(irc, ircmsgs.invite(nick or msg.nick, channel))
nick = nick or msg.nick
self._sendMsg(irc, ircmsgs.invite(nick, channel))
self.invites[(irc.getRealIrc(), ircutils.toLower(nick))] = irc
invite = wrap(invite, ['op', ('haveOp', 'invite someone'),
additional('nick')])