From 19d41d7298398b133f41d90503daff1c734247df Mon Sep 17 00:00:00 2001 From: James Lu Date: Mon, 17 Jul 2017 09:12:07 -0700 Subject: [PATCH] ngircd: add GLINE support Also add IRCd notes regarding AllowRemoteOper and modeless channels. --- README.md | 2 ++ protocols/ngircd.py | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 5675be4..11c8495 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,8 @@ Support for these IRCds exist, but are not tested as frequently and thoroughly. - Host changing is not supported. * [juno-ircd](https://github.com/cooper/yiria) (11.x / janet) - module `ts6` (see [configuration example](https://github.com/cooper/juno/blob/master/doc/ts6.md#pylink)) * [ngIRCd](https://ngircd.barton.de/) (24+) - module `ngircd` + - For GLINEs to propagate, the `AllowRemoteOper` option must be enabled in ngIRCd. + - `+` (modeless) channels are not supported, and should be disabled for PyLink to function correctly. * [snircd](https://development.quakenet.org/) (1.3.x+) - module `p10` - Outbound host changing (i.e. for the `changehost` plugin) is not supported on P10 variants other than Nefarious. diff --git a/protocols/ngircd.py b/protocols/ngircd.py index f1b956c..1aec880 100644 --- a/protocols/ngircd.py +++ b/protocols/ngircd.py @@ -256,6 +256,14 @@ class NgIRCdProtocol(IRCS2SProtocol): log.debug("(%s) sjoin: bursting modes %r for channel %r now", self.name, modes, channel) self.mode(server, channel, modes) + def set_server_ban(self, source, duration, user='*', host='*', reason='User banned'): + """ + Sets a server ban. + """ + # <- :GL GLINE *!*@bad.user 3d :test + assert not (user == host == '*'), "Refusing to set ridiculous ban on *@*" + self._send_with_prefix(source, 'GLINE *!%s@%s %s :%s' % (user, host, duration, reason)) + def update_client(self, target, field, text): """Updates the ident, host, or realname of any connected client.""" field = field.upper()