[Otfbot-svn] r118 - trunk

allo at BerliOS allo
Sa Jun 23 19:07:27 CEST 2007


Author: allo
Date: 2007-06-23 19:07:27 +0200 (Sat, 23 Jun 2007)
New Revision: 118

Modified:
   trunk/otfbot.py
Log:
fix for last commit


Modified: trunk/otfbot.py
===================================================================
--- trunk/otfbot.py	2007-06-23 17:04:02 UTC (rev 117)
+++ trunk/otfbot.py	2007-06-23 17:07:27 UTC (rev 118)
@@ -176,12 +176,7 @@
     #    file.write(option+"="+config[option]+"\n")
     file.write(theconfig.exportxml())
     file.close()
-schedulethread=scheduler.Schedule()
-schedulethread.start()
 
-def addScheduleJob(time, function):
-    schedulethread.addScheduleJob(time, function)
-    
 class Bot(irc.IRCClient):
     """The Protocol of our IRC-Bot"""
     def __init__(self):
@@ -201,8 +196,8 @@
         self.logging = logging
         self.logger = logging.getLogger("core")
         self.logger.info("Starting new Botinstance")
-        self.startMods()
         self.scheduler = scheduler.Scheduler(self.getReactor())
+        self.startMods()
     
     def _apirunner(self,apifunction,args={}):
         """Pass all calls to modules callbacks through this method, they are checked whether they should be execeted or not"""
@@ -459,7 +454,6 @@
     def _checkforshutdown(self):
         if len(self.instances)==0:
             corelogger.info("Not Connected to any network. Shutting down.")
-            schedulethread.stop()
             #TODO: add sth to stop modules
             reactor.stop()
     




Mehr Informationen über die Mailingliste Otfbot-dev