Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Commit

Permalink
services_support: migrate to conf.conf['pylink'], make the realname o…
Browse files Browse the repository at this point in the history
…ption optional
  • Loading branch information
jlu5 committed Jul 14, 2017
1 parent 06d3de3 commit 5a5a98c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions coremods/service_support.py
Expand Up @@ -35,15 +35,15 @@ def spawn_service(irc, source, command, args):
# Determine host the same way as above, except fall back to server hostname.
host = irc.serverdata.get("%s_host" % name) or sbconf.get('host') or irc.hostname()

# Determine realname the same way as above, except fall back to pylink:realname.
realname = irc.serverdata.get("%s_realname" % name) or sbconf.get('realname') or conf.conf['bot']['realname']
# Determine realname the same way as above, except fall back to pylink:realname (and if that fails, the service name).
realname = irc.serverdata.get("%s_realname" % name) or sbconf.get('realname') or conf.conf['pylink'].get('realname') or name

# Spawning service clients with these umodes where supported. servprotect usage is a
# configuration option.
preferred_modes = ['oper', 'hideoper', 'hidechans', 'invisible', 'bot']
modes = []

if conf.conf['bot'].get('protect_services'):
if conf.conf['pylink'].get('protect_services'):
preferred_modes.append('servprotect')

for mode in preferred_modes:
Expand Down

0 comments on commit 5a5a98c

Please sign in to comment.