3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-24 03:33:10 +01:00

ngircd: add GLINE support

Also add IRCd notes regarding AllowRemoteOper and modeless channels.
This commit is contained in:
James Lu 2017-07-17 09:12:07 -07:00
parent 75e286fdc7
commit 19d41d7298
2 changed files with 10 additions and 0 deletions

View File

@ -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.

View File

@ -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()