From bf8e9d0c833efed489bb5c920fa859b123dd75bf Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 7 Jan 2014 17:09:44 +0100 Subject: ircbot: wait after reconnect --- ircbot/contoller.py | 4 ++++ ircbot/rssbot.py | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ircbot/contoller.py b/ircbot/contoller.py index 95e1132b..8db32b8e 100755 --- a/ircbot/contoller.py +++ b/ircbot/contoller.py @@ -43,6 +43,10 @@ class NewsBot(irc.bot.SingleServerIRCBot): answer = self.read_message(args_array[1:]) self.send(event.target, answer) + def on_invite(self, connection, event): + for chan in event.arguments: + connection.join(chan) + def read_message(self, args): try: if args[0] in [x for x in commands.__dict__.keys() if x.find('_')]: diff --git a/ircbot/rssbot.py b/ircbot/rssbot.py index e7349d0d..07843e07 100755 --- a/ircbot/rssbot.py +++ b/ircbot/rssbot.py @@ -54,7 +54,6 @@ class RssBot(irc.bot.SingleServerIRCBot): self.lastnew = datetime.now() sleep(self.to) - def send(self, string): if self.connection.connected: for line in string.split('\n'): -- cgit v1.2.3