From 785fc8d2d23adeb05061d7b01945a9d58d1ccef4 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 11 Aug 2017 12:15:05 -0700 Subject: [PATCH] ts6: handle ChatIRCd ENCAP USERMODE Per https://github.com/ChatLounge/ChatIRCd/blob/master/doc/technical/ChatIRCd-extra.txt --- protocols/ts6.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/protocols/ts6.py b/protocols/ts6.py index d85de69..ef192d0 100644 --- a/protocols/ts6.py +++ b/protocols/ts6.py @@ -18,13 +18,18 @@ class TS6Protocol(TS6BaseProtocol): self.protocol_caps |= {'slash-in-hosts'} self.casemapping = 'rfc1459' self.hook_map = {'SJOIN': 'JOIN', 'TB': 'TOPIC', 'TMODE': 'MODE', 'BMASK': 'MODE', - 'EUID': 'UID', 'RSFNC': 'SVSNICK', 'ETB': 'TOPIC'} + 'EUID': 'UID', 'RSFNC': 'SVSNICK', 'ETB': 'TOPIC', 'USERMODE': 'MODE'} # Track whether we've received end-of-burst from the uplink. self.has_eob = False self.required_caps = {'EUID', 'SAVE', 'TB', 'ENCAP', 'QS', 'CHW'} + # From ChatIRCd: https://github.com/ChatLounge/ChatIRCd/blob/master/doc/technical/ChatIRCd-extra.txt + # Our command handler rewrites ENCAP so that this is the exact same syntax as MODE. + # <- :101AAAAAB ENCAP test.hub2 USERMODE 111AAAAAB :+Qw + self.handle_usermode = self.handle_mode + ### OUTGOING COMMANDS def spawn_client(self, nick, ident='null', host='null', realhost=None, modes=set(),