[Otfbot-svn] r113 - trunk/modules

allo at BerliOS allo
Sa Jun 23 14:01:28 CEST 2007


Author: allo
Date: 2007-06-23 14:01:27 +0200 (Sat, 23 Jun 2007)
New Revision: 113

Modified:
   trunk/modules/reminderMod.py
Log:
use reactor.callLater instead of own scheduler


Modified: trunk/modules/reminderMod.py
===================================================================
--- trunk/modules/reminderMod.py	2007-06-14 23:44:53 UTC (rev 112)
+++ trunk/modules/reminderMod.py	2007-06-23 12:01:27 UTC (rev 113)
@@ -48,7 +48,7 @@
 
 			tmp=msg.split(" ", 2)
 			try:
-				wait=int(tmp[1])
+				wait=float(tmp[1])
 			except ValueError:
 				self.bot.sendmsg(channel, user.split("!")[0]+": invalid number format \""+tmp[1]+"\".")
 				return
@@ -59,4 +59,4 @@
 				self.messages[when].append([channel, user, text])
 			else:
 				self.messages[when]=[[channel, user, text]]
-			self.bot.addScheduleJob(wait, self.remind)
+			self.bot.getReactor().callLater(wait*60, self.remind)




Mehr Informationen über die Mailingliste Otfbot-dev