From df3d7a4ecb3936fa7bc938e223a37a77d3a2bedd Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sun, 3 Oct 2004 09:55:10 +0000 Subject: [PATCH] Oops, exception when a dude quits and supybot's not in a channel he's supposed to be in. --- plugins/Relay.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/Relay.py b/plugins/Relay.py index 67c32a219..fa015a8fe 100644 --- a/plugins/Relay.py +++ b/plugins/Relay.py @@ -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)