From 83f339a4a17e80e06245878ddfdd095bbc2c69dd Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 14 Jan 2014 00:03:26 +0100 Subject: reaktor: send JOIN after MOTD --- IRC/ircasy.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/IRC/ircasy.py b/IRC/ircasy.py index 6b7567c..4b800d4 100644 --- a/IRC/ircasy.py +++ b/IRC/ircasy.py @@ -109,6 +109,9 @@ class asybot(asychat): self.nickname = nickname + str(int + 1) self.handle_connect() + elif command == '376': + self.on_welcome(prefix, command, params, rest) + self.reset_alarm() def push(self, message): @@ -131,7 +134,6 @@ class asybot(asychat): self.push('NICK %s' % self.nickname) self.push('USER %s %s %s :%s' % (self.username, self.hostname, self.server, self.realname)) - self.push('JOIN %s' % ','.join(self.channels)) def handle_disconnect(self): if self.retry: @@ -139,9 +141,6 @@ class asybot(asychat): else: self.log.error('No retry set, giving up') - def on_privmsg(self, prefix, command, params, rest): - pass - def PRIVMSG(self, target, text): for line in self.wrapper.wrap(text): msg = 'PRIVMSG %s :%s' % (','.join(target), line) @@ -151,3 +150,9 @@ class asybot(asychat): def ME(self, target, text): self.PRIVMSG(target, ('ACTION ' + text + '')) + + def on_privmsg(self, prefix, command, params, rest): + pass + + def on_welcome(self, prefix, command, params, rest): + self.push('JOIN %s' % ','.join(self.channels)) -- cgit v1.2.3