aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@googlemail.com>2014-01-14 00:03:26 +0100
committerlassulus <lassulus@googlemail.com>2014-01-14 00:03:26 +0100
commit83f339a4a17e80e06245878ddfdd095bbc2c69dd (patch)
treebc89a581f6fdf119609c52e75dba67f470809fa0
parent8642373ef5b068ff7996fc9172d9d857d8ad2934 (diff)
reaktor: send JOIN after MOTD
-rw-r--r--IRC/ircasy.py13
1 files 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))