From df471859d0d138ce5f9868daae902eb0de86b716 Mon Sep 17 00:00:00 2001 From: urlbot Date: Fri, 28 Nov 2014 19:18:45 +0100 Subject: [PATCH] fix multi-item 'msg' for plugins --- plugins.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins.py b/plugins.py index 76515f4..bf7ed31 100644 --- a/plugins.py +++ b/plugins.py @@ -432,10 +432,10 @@ def command_show_blacklist(args): logger('plugin', 'sent URL blacklist') return { - 'msg': '\n'.join([ + 'msg': [ args['reply_user'] + ': URL blacklist: ' + b for b in conf('url_blacklist') - ]) + ] } #def command_dummy(args): @@ -530,7 +530,11 @@ def data_parse_commands(data): return False if 'msg' in list(ret.keys()): - chat_write(ret['msg']) + if list is type(ret['msg']): + for m in ret['msg']: + chat_write(m) + else: + chat_write(ret['msg']) funcs = {} funcs['parse'] = (parse_mental_ill, parse_skynet, parse_debbug)