From 3646930d34cfa18e5d2a6299537e627830105921 Mon Sep 17 00:00:00 2001 From: James Lu Date: Wed, 29 Jul 2015 04:02:45 -0700 Subject: [PATCH] relay: disable "you must in a share channel" messages; they're buggy --- plugins/relay.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/relay.py b/plugins/relay.py index 3981203..38a4954 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -314,9 +314,14 @@ def handle_privmsg(irc, numeric, command, args): relay = findRelay((irc.name, target)) # 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! + remoteusers = relayusers[(irc.name, numeric)].items() + ''' if utils.isChannel(target) and ((relay and not db[relay]['links']) or \ relay is None): return + ''' + if not remoteusers: + return for netname, user in relayusers[(irc.name, numeric)].items(): remoteirc = utils.networkobjects[netname] # HACK: Don't break on sending to @#channel or similar. @@ -342,6 +347,7 @@ def handle_privmsg(irc, numeric, command, args): else: remoteirc.proto.messageClient(remoteirc, user, real_target, text) sent += 1 + ''' if not sent: # We must be on a common channel with the target. Otherwise, the sender # doesn't have a client representing them on the remote network, @@ -354,6 +360,7 @@ def handle_privmsg(irc, numeric, command, args): target_s = repr(target) utils.msg(irc, numeric, 'Error: You must be in %s in order to send messages.' % \ target_s, notice=True) + ''' utils.add_hook(handle_privmsg, 'PRIVMSG') utils.add_hook(handle_privmsg, 'NOTICE')