Oops, exception when a dude quits and supybot's not in a channel he's supposed to be in.

This commit is contained in:
Jeremy Fincher 2004-10-03 09:55:10 +00:00
parent 65cf9af143
commit df3d7a4ecb
1 changed files with 4 additions and 3 deletions

View File

@ -524,9 +524,10 @@ class Relay(callbacks.Privmsg):
else:
s = '%s has quit %s.' % (msg.nick, network)
for channel in self.registryValue('channels'):
if msg.nick in self.ircstates[irc].channels[channel].users:
m = ircmsgs.privmsg(channel, s)
self._sendToOthers(irc, m)
if channel in self.ircstates[irc].channels:
if msg.nick in self.ircstates[irc].channels[channel].users:
m = ircmsgs.privmsg(channel, s)
self._sendToOthers(irc, m)
def outFilter(self, irc, msg):
irc = self._getRealIrc(irc)