summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@googlemail.com>2014-01-07 17:09:44 +0100
committerlassulus <lassulus@googlemail.com>2014-01-07 17:09:44 +0100
commitbf8e9d0c833efed489bb5c920fa859b123dd75bf (patch)
treec03af88e433e7cb096777a4d7f485bc2a64acca6
parent5a51adde8b322d34722f50702d6bd553382bc623 (diff)
ircbot: wait after reconnect
-rwxr-xr-xircbot/contoller.py4
-rwxr-xr-xircbot/rssbot.py1
2 files changed, 4 insertions, 1 deletions
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'):