From 7a32e7d8a21b9631177fcfd5c57bc12205347305 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 (cherry picked from commit 15a231a3711b96bbad2b2cda7339bcb838ea95df) --- plugins/global.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/global.py b/plugins/global.py index edebbdc..d5a339d 100644 --- a/plugins/global.py +++ b/plugins/global.py @@ -15,7 +15,8 @@ def g(irc, source, args): """ permissions.checkPermissions(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