]> jfr.im git - erebus.git/blobdiff - bot.py
urls - bugfixes
[erebus.git] / bot.py
diff --git a/bot.py b/bot.py
index 883472448f039b1c17d381ba6749657c670445a3..16979727e6194891ce0b02b024415ef8b2c687b7 100644 (file)
--- a/bot.py
+++ b/bot.py
@@ -51,9 +51,9 @@ class Bot(object):
                except: pass
 
        def watchdog(self):
-               if time.time() > self.parent.cfg.get('watchdog', 'maxtime', default=300)+self.lastreceived:
+               if time.time() > int(self.parent.cfg.get('watchdog', 'maxtime', default=300))+self.lastreceived:
                        self.parse("ERROR :Fake-error from watchdog timer.")
-               self.watchdogtimer = MyTimer(self.parent.cfg.get('watchdog', 'interval', default=30), self.watchdog)
+               self.watchdogtimer = MyTimer(int(self.parent.cfg.get('watchdog', 'interval', default=30)), self.watchdog)
 
        def log(self, *args, **kwargs):
                self.parent.log(self.nick, *args, **kwargs)
@@ -454,7 +454,7 @@ class BotConnection(object):
                return self.state == 2
 
        def send(self, line):
-               if self.parent.cfg.getboolean('debug', 'io'):
+               if self.parent.parent.cfg.getboolean('debug', 'io'):
                        self.parent.log('O', line)
 #              print "%09.3f %s [O] %s" % (time.time() % 100000, self.parent.nick, line)
                self.bytessent += len(line)