From 6cbb6617efb836955ddd8b8935cd2dd544c827d9 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 23 Sep 2017 14:38:53 -0700 Subject: [PATCH] relay: don't forward simple bans as text to clientbot links if modesync is on Closes #528. --- plugins/relay.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/relay.py b/plugins/relay.py index 9c9c2b5..aef123e 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -1542,6 +1542,10 @@ def handle_mode(irc, numeric, command, args): # Convert UIDs to nicks when relaying this to clientbot. modepair = (modepair[0], irc.get_friendly_name(modepair[1])) + elif modepair[0][-1] in irc.cmodes['*A'] and irc.is_hostmask(modepair[1]) and \ + conf.conf.get('relay', {}).get('clientbot_modesync', 'none').lower() != 'none': + # Don't show bans if the ban is a simple n!u@h and modesync is enabled + continue friendly_modes.append(modepair) if friendly_modes: