fix multi-item 'msg' for plugins

This commit is contained in:
urlbot
2014-11-28 19:18:45 +01:00
parent 31f1e285c6
commit df471859d0

View File

@@ -432,10 +432,10 @@ def command_show_blacklist(args):
logger('plugin', 'sent URL blacklist') logger('plugin', 'sent URL blacklist')
return { return {
'msg': '\n'.join([ 'msg': [
args['reply_user'] + ': URL blacklist: ' + b args['reply_user'] + ': URL blacklist: ' + b
for b in conf('url_blacklist') for b in conf('url_blacklist')
]) ]
} }
#def command_dummy(args): #def command_dummy(args):
@@ -530,6 +530,10 @@ def data_parse_commands(data):
return False return False
if 'msg' in list(ret.keys()): if 'msg' in list(ret.keys()):
if list is type(ret['msg']):
for m in ret['msg']:
chat_write(m)
else:
chat_write(ret['msg']) chat_write(ret['msg'])
funcs = {} funcs = {}