diff start_bots_from_xml_config.py @ 124:99f3dee1fad7

code cleaning Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Wed, 13 Jan 2010 23:08:44 +0100
parents bfa32b017fc9
children e0eea72ea493
line wrap: on
line diff
--- a/start_bots_from_xml_config.py
+++ b/start_bots_from_xml_config.py
@@ -17,12 +17,12 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-from bot import bot
+from xml.dom.minidom import parse
 from time import sleep
-from xml.dom.minidom import parse
 import sys
 import traceback
 
+from bot import Bot
 
 
 try:
@@ -53,8 +53,8 @@ try:
 		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_)
+		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]
 			irc = bridge_el.getElementsByTagName('irc')[0]
@@ -65,7 +65,7 @@ try:
 				mode = bridge_el.getAttribute('mode')
 			else:
 				mode = 'normal'
-			bridge_ = bot_.new_bridge(xmpp_room.getAttribute('jid'), irc.getAttribute('chan'), irc.getAttribute('server'), mode, say_level)
+			bot.new_bridge(xmpp_room.getAttribute('jid'), irc.getAttribute('chan'), irc.getAttribute('server'), mode, say_level)
 	
 	
 	while True: