3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-27 13:09:23 +01:00

global: ignore empty "global:" configuration blocks

This commit is contained in:
James Lu 2017-11-06 12:07:33 -08:00
parent b6af6dddc5
commit 15a231a371

View File

@ -15,7 +15,8 @@ def g(irc, source, args):
"""
permissions.check_permissions(irc, source, ["global.global"])
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():
if ircd.connected.is_set(): # Only attempt to send to connected networks