diff --git a/plugins/relay_clientbot.py b/plugins/relay_clientbot.py index aa6e90e..b4eea42 100644 --- a/plugins/relay_clientbot.py +++ b/plugins/relay_clientbot.py @@ -47,7 +47,7 @@ def cb_relay_core(irc, source, command, args): except KeyError: # User has left due to /quit sourcename = args['userdata'].nick - relay_conf = conf.conf.get('relay', {}) + relay_conf = conf.conf.get('relay') or {} # Be less floody on startup: don't relay non-PRIVMSGs for the first X seconds after connect. startup_delay = relay_conf.get('clientbot_startup_delay', 20) @@ -80,8 +80,8 @@ def cb_relay_core(irc, source, command, args): # Try to fetch the format for the given command from the relay:clientbot_styles:$command # key, falling back to one defined in default_styles above, and then nothing if not found # there. - text_template = relay_conf.get('clientbot_styles', {}).get(real_command, - default_styles.get(real_command, '')) + text_template = (relay_conf.get('clientbot_styles') or {}).get(real_command, + default_styles.get(real_command, '')) text_template = string.Template(text_template) if text_template: