3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 17:29:21 +01:00

global: ignore empty "global:" configuration blocks

(cherry picked from commit 15a231a371)
This commit is contained in:
James Lu 2017-11-06 12:07:33 -08:00
parent d5d140f4b0
commit 7a32e7d8a2

View File

@ -15,7 +15,8 @@ def g(irc, source, args):
""" """
permissions.checkPermissions(irc, source, ["global.global"]) permissions.checkPermissions(irc, source, ["global.global"])
message = " ".join(args) message = " ".join(args)
template = string.Template(conf.conf.get('global', {}).get("format", DEFAULT_FORMAT)) global_conf = conf.conf.get('global') or {}
template = string.Template(global_conf.get('format', DEFAULT_FORMAT))
for name, ircd in world.networkobjects.items(): for name, ircd in world.networkobjects.items():
if ircd.connected.is_set(): # Only attempt to send to connected networks if ircd.connected.is_set(): # Only attempt to send to connected networks