mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
service_support: support optionally setting servprotect on service bots
Closes #243.
This commit is contained in:
parent
017d6a4651
commit
408ce701b1
@ -29,10 +29,15 @@ def spawn_service(irc, source, command, args):
|
|||||||
# TODO: make this configurable?
|
# TODO: make this configurable?
|
||||||
host = irc.serverdata["hostname"]
|
host = irc.serverdata["hostname"]
|
||||||
|
|
||||||
# Prefer spawning service clients with umode +io, plus hideoper and
|
# Spawning service clients with these umodes where supported. servprotect usage is a
|
||||||
# hidechans if supported.
|
# configuration option.
|
||||||
|
preferred_modes = ['oper', 'hideoper', 'hidechans', 'invisible', 'bot']
|
||||||
modes = []
|
modes = []
|
||||||
for mode in ('oper', 'hideoper', 'hidechans', 'invisible', 'bot'):
|
|
||||||
|
if conf.conf['bot'].get('protect_services'):
|
||||||
|
preferred_modes.append('servprotect')
|
||||||
|
|
||||||
|
for mode in preferred_modes:
|
||||||
mode = irc.umodes.get(mode)
|
mode = irc.umodes.get(mode)
|
||||||
if mode:
|
if mode:
|
||||||
modes.append((mode, None))
|
modes.append((mode, None))
|
||||||
|
@ -30,6 +30,12 @@ bot:
|
|||||||
# Defaults to true if not specified.
|
# Defaults to true if not specified.
|
||||||
whois_use_hideoper: true
|
whois_use_hideoper: true
|
||||||
|
|
||||||
|
# Determines whether PyLink service clients should protect themselves from
|
||||||
|
# kicks, kills, etc. using IRCd-side servprotect modes. For this to work
|
||||||
|
# properly, this requires that PyLink be U-Lined (on most IRCds). Defaults to
|
||||||
|
# False.
|
||||||
|
protect_services: false
|
||||||
|
|
||||||
login:
|
login:
|
||||||
# PyLink administrative login - Change this, or the service will not start!
|
# PyLink administrative login - Change this, or the service will not start!
|
||||||
user: admin
|
user: admin
|
||||||
|
Loading…
Reference in New Issue
Block a user