From cbe7fa539f460bb1a2f5825e77bd2727c0711290 Mon Sep 17 00:00:00 2001 From: James Lu Date: Thu, 23 Jul 2015 11:41:33 -0700 Subject: [PATCH] relay: remove more spurious "you must be in channel" messages --- plugins/relay.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/relay.py b/plugins/relay.py index dbba8be..935eae7 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -310,7 +310,10 @@ def handle_privmsg(irc, numeric, command, args): return sent = 0 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 for netname, user in relayusers[(irc.name, numeric)].items(): remoteirc = utils.networkobjects[netname]