From 5a5a98c4ef2d83865a5bec9e65891cce36de5088 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 14 Jul 2017 05:51:40 -0700 Subject: [PATCH] services_support: migrate to conf.conf['pylink'], make the realname option optional --- coremods/service_support.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/coremods/service_support.py b/coremods/service_support.py index 24c43ce..b16565f 100644 --- a/coremods/service_support.py +++ b/coremods/service_support.py @@ -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: