[Otfbot-svn] r589 - trunk/plugins/ircClient

allo at mail.berlios.de allo
So Aug 30 01:15:29 CEST 2009


Author: allo
Date: 2009-08-30 01:15:20 +0200 (Sun, 30 Aug 2009)
New Revision: 589

Modified:
   trunk/plugins/ircClient/ki.py
Log:
bugfix


Modified: trunk/plugins/ircClient/ki.py
===================================================================
--- trunk/plugins/ircClient/ki.py	2009-08-03 14:54:40 UTC (rev 588)
+++ trunk/plugins/ircClient/ki.py	2009-08-29 23:15:20 UTC (rev 589)
@@ -31,7 +31,7 @@
 except ImportError:
     MEGAHAL=0
 try:
-    import pyniall_sqlite
+    from lib import pyniall_sqlite
 except ImportError:
     NIALL=0
 
@@ -255,7 +255,7 @@
         delay=len(reply)*0.3*float(self.bot.config.get("wait", "2", "kiMod", self.bot.network)) #a normal user does not type that fast
         if number < chance:
             #self.bot.sendmsg(user, reply, "UTF-8")
-            self.bot.getNamedServices()['scheduler'].callLater(delay, self.bot.sendmsg, user, reply, "UTF-8")
+            self.bot.getNamedService('scheduler').callLater(delay, self.bot.sendmsg, user, reply, "UTF-8")
     def msg(self, user, channel, msg):
         user=user.split("!")[0]
         if not user in self.nicklist:
@@ -312,10 +312,10 @@
             chance=int(self.bot.config.get("answerPercent", "50", "kiMod", self.bot.network, channel))*10
             if israndom:
                 #self.bot.sendmsg(channel, reply, "UTF-8")
-                self.bot.getNamedServices()['scheduler'].callLater(delay, self.bot.sendmsg, channel, reply, "UTF-8")
+                self.bot.getNamedService('scheduler').callLater(delay, self.bot.sendmsg, channel, reply, "UTF-8")
             elif number < chance: #apply answerPercent only on answers
                 #self.bot.sendmsg(channel, user+": "+reply, "UTF-8")
-                self.bot.getNamedServices()['scheduler'].callLater(delay, self.bot.sendmsg, channel, user+": "+reply, "UTF-8")
+                self.bot.getNamedService('scheduler').callLater(delay, self.bot.sendmsg, channel, user+": "+reply, "UTF-8")
 
     def connectionMade(self):
         self.lnickname=string.lower(self.bot.nickname)




Mehr Informationen über die Mailingliste Otfbot-dev