From 73464e516f83f89ea4d3ddd8d37e51154389b866 Mon Sep 17 00:00:00 2001 From: James Lu Date: Thu, 6 Jul 2017 20:12:29 -0700 Subject: [PATCH] ngircd: fill in mode definitions Source: https://github.com/ngircd/ngircd/blob/master/doc/Modes.txt --- protocols/ngircd.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/protocols/ngircd.py b/protocols/ngircd.py index d9c27d3..071e92e 100644 --- a/protocols/ngircd.py +++ b/protocols/ngircd.py @@ -51,6 +51,18 @@ class NgIRCdProtocol(IRCS2SProtocol): self._caps.clear() + self.cmodes.update({ + 'banexception': 'e', 'invex': 'I', 'regmoderated': 'M', 'nonick': 'N', + 'operonly': 'O', 'permanent': 'P', 'nokick': 'Q', 'registered': 'r', + 'regonly': 'R', 'noinvite': 'V', 'sslonly': 'z' + }) + + self.umodes.update({ + 'away': 'a', 'deaf': 'b', 'bot': 'B', 'sno_clientconnections': 'c', + 'deaf_commonchan': 'C', 'floodexempt': 'f', 'hidechans': 'I', + 'servprotect': 'q', 'restricted': 'r', 'registered': 'R', 'cloak': 'x' + }) + def spawn_client(self, nick, ident='null', host='null', realhost=None, modes=set(), server=None, ip='0.0.0.0', realname=None, ts=None, opertype='IRC Operator', manipulatable=False): @@ -290,7 +302,6 @@ class NgIRCdProtocol(IRCS2SProtocol): log.debug("(%s) Ignoring KILL to %r as it isn't meant for us; we should see a QUIT soon", self.name, killed) - def handle_nick(self, source, command, args): """ Handles the NICK command, used for server introductions and nick changes.