3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-28 05:29:25 +01:00

relay: remove more spurious "you must be in channel" messages

This commit is contained in:
James Lu 2015-07-23 11:41:33 -07:00
parent 42593ae431
commit cbe7fa539f

View File

@ -310,7 +310,10 @@ def handle_privmsg(irc, numeric, command, args):
return return
sent = 0 sent = 0
relay = findRelay((irc.name, target)) relay = findRelay((irc.name, target))
if utils.isChannel(target) and relay and not db[relay]['links']: # Don't send any "you must be in common channels" if we're not part
# of a relay, or we are but there are no links!
if utils.isChannel(target) and ((relay and not db[relay]['links']) or \
relay is None):
return return
for netname, user in relayusers[(irc.name, numeric)].items(): for netname, user in relayusers[(irc.name, numeric)].items():
remoteirc = utils.networkobjects[netname] remoteirc = utils.networkobjects[netname]