From 1408622694ce78b854c1785494d34d89458025ed Mon Sep 17 00:00:00 2001 From: James Lu Date: Wed, 23 Aug 2017 23:23:18 -0700 Subject: [PATCH] ts6: add definitions for inverted extbans as well --- protocols/ts6.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/protocols/ts6.py b/protocols/ts6.py index 6c9d107..585dcd5 100644 --- a/protocols/ts6.py +++ b/protocols/ts6.py @@ -343,6 +343,14 @@ class TS6Protocol(TS6BaseProtocol): self.umodes.update(chatircd_umodes) self.umodes['*D'] += ''.join(chatircd_umodes.values()) + # Add definitions for all the inverted versions of the extbans. + for k, v in self.extbans_matching.copy().items(): + if k == 'ban_all_registered': + newk = 'ban_unregistered' + else: + newk = k.replace('_all_', '_').replace('ban_', 'ban_not_') + self.extbans_matching[newk] = '$~' + v[1:] + # https://github.com/grawity/irc-docs/blob/master/server/ts6.txt#L55 f('PASS %s TS 6 %s' % (self.serverdata["sendpass"], self.sid))