From 15a231a3711b96bbad2b2cda7339bcb838ea95df Mon Sep 17 00:00:00 2001 From: James Lu Date: Mon, 6 Nov 2017 12:07:33 -0800 Subject: [PATCH] global: ignore empty "global:" configuration blocks --- plugins/global.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/global.py b/plugins/global.py index 8d281d4..eb51509 100644 --- a/plugins/global.py +++ b/plugins/global.py @@ -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