LinkRelay: fix quit relaying

master
Valentin Lorentz 2011-02-18 18:51:27 +01:00
parent 6064406f4b
commit c7c04b2c57
1 changed files with 3 additions and 2 deletions

View File

@ -216,12 +216,13 @@ class LinkRelay(callbacks.Plugin):
self.addIRC(irc)
def sendToOthers(self, irc, channel, s, nick=None):
assert channel is not None or nick is not None
for relay in self.relays:
if channel is None:
assert nick is not None
found = False
for channel in relay.sourceIRCChannels:
if nick in relay.sourceIRCChannels[channel].users:
if nick in relay.sourceIRCChannels[channel].users and \
relay.channelRegex.match(channel):
found = True
break
if not found: