From 2ca3dfe6890f6522aadde44a29340bff7aad3722 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sun, 31 Jul 2016 20:38:25 -0700 Subject: [PATCH] ts6_common: rewrite =#channel messages to @#channel (charybdis +z support) --- protocols/ts6_common.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/protocols/ts6_common.py b/protocols/ts6_common.py index 666e5aa..bdd37e0 100644 --- a/protocols/ts6_common.py +++ b/protocols/ts6_common.py @@ -351,7 +351,13 @@ class TS6BaseProtocol(IRCS2SProtocol): # <- :70MAAAAAA NOTICE 0ALAAAAAA :afasfsa target = args[0] + # Coerse =#channel from Charybdis op moderated +z to @#channel. + if target.startswith('='): + target = '@' + target[1:] + # We use lowercase channels internally, but uppercase UIDs. + # Strip the target of leading prefix modes (for targets like @#channel) + # before checking whether it's actually a channel. stripped_target = target.lstrip(''.join(self.irc.prefixmodes.values())) if utils.isChannel(stripped_target): target = self.irc.toLower(target)