diff 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
line wrap: on
line diff
--- a/start_bots_from_xml_config.py
+++ b/start_bots_from_xml_config.py
@@ -49,7 +49,11 @@ try:
 		if bot_el.hasAttribute('debug'):
 			if bot_el.getAttribute('debug') == 'true':
 				debug = True
-		bot_ = bot(bot_el.getAttribute('jid'), bot_el.getAttribute('password'), bot_el.getAttribute('nickname'), debug=debug)
+		admins_jid = []
+		for admin_el in bot_el.getElementsByTagName('admin'):
+			if admin_el.hasAttribute('jid'):
+				admins_jid.append(admin_el.getAttribute('jid'))
+		bot_ = bot(bot_el.getAttribute('jid'), bot_el.getAttribute('password'), bot_el.getAttribute('nickname'), admins_jid=admins_jid, debug=debug)
 		bots.append(bot_)
 		for bridge_el in bot_el.getElementsByTagName('bridge'):
 			xmpp_room = bridge_el.getElementsByTagName('xmpp-room')[0]