[Otfbot-svn] r101 - trunk/modules

allo at BerliOS allo
So Jun 10 16:50:49 CEST 2007


Author: allo
Date: 2007-06-10 16:50:49 +0200 (Sun, 10 Jun 2007)
New Revision: 101

Modified:
   trunk/modules/commandsMod.py
Log:
fix for commandsMod


Modified: trunk/modules/commandsMod.py
===================================================================
--- trunk/modules/commandsMod.py	2007-06-10 14:13:36 UTC (rev 100)
+++ trunk/modules/commandsMod.py	2007-06-10 14:50:49 UTC (rev 101)
@@ -31,12 +31,13 @@
 	def __init__(self, bot):
 		self.bot = bot
 		self.commandChar={}
+		self.channels=[]
 
 	def connectionMade(self):
 		self.reload()
 		
 	def joined(self, channel):
-		self.channel = channel
+		self.commands[channel]=functions.loadProperties(self.bot.getConfig("file", "commands.txt", "commandsMod", self.bot.network, channel))
 		self.commandChar[channel]=self.bot.getConfig("commandChar", "!", "commandsMod", self.bot.network, channel)
 	
 	def msg(self, user, channel, msg):
@@ -63,9 +64,6 @@
 		self.commandChar={}
 		self.commands["general"]=functions.loadProperties(self.bot.getConfig("file","commands.txt","commandsMod"))
 		self.commands["network"]=functions.loadProperties(self.bot.getConfig("file","commands.txt","commandsMod", self.bot.network))
-		for channel in self.bot.channels:
-			self.commands[channel]=functions.loadProperties(self.bot.getConfig("file", "commands.txt", "commandsMod", self.bot.network, channel))
-			self.commandChar[channel]=self.bot.getConfig("commandChar", "!", "commandsMod", self.bot.network, channel)
 
 	def reload(self):
 		self.start()




Mehr Informationen über die Mailingliste Otfbot-dev