comparison start_bots_from_xml_config.py @ 86:bfa32b017fc9

First hack at an error notification system Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Sun, 06 Sep 2009 15:34:49 +0200
parents 801160b4136f
children 99f3dee1fad7
comparison
equal deleted inserted replaced
85:dfa030c141f1 86:bfa32b017fc9
47 for bot_el in config.getElementsByTagName('bot'): 47 for bot_el in config.getElementsByTagName('bot'):
48 debug = False 48 debug = False
49 if bot_el.hasAttribute('debug'): 49 if bot_el.hasAttribute('debug'):
50 if bot_el.getAttribute('debug') == 'true': 50 if bot_el.getAttribute('debug') == 'true':
51 debug = True 51 debug = True
52 bot_ = bot(bot_el.getAttribute('jid'), bot_el.getAttribute('password'), bot_el.getAttribute('nickname'), debug=debug) 52 admins_jid = []
53 for admin_el in bot_el.getElementsByTagName('admin'):
54 if admin_el.hasAttribute('jid'):
55 admins_jid.append(admin_el.getAttribute('jid'))
56 bot_ = bot(bot_el.getAttribute('jid'), bot_el.getAttribute('password'), bot_el.getAttribute('nickname'), admins_jid=admins_jid, debug=debug)
53 bots.append(bot_) 57 bots.append(bot_)
54 for bridge_el in bot_el.getElementsByTagName('bridge'): 58 for bridge_el in bot_el.getElementsByTagName('bridge'):
55 xmpp_room = bridge_el.getElementsByTagName('xmpp-room')[0] 59 xmpp_room = bridge_el.getElementsByTagName('xmpp-room')[0]
56 irc = bridge_el.getElementsByTagName('irc')[0] 60 irc = bridge_el.getElementsByTagName('irc')[0]
57 say_level = 'all' 61 say_level = 'all'