aboutsummaryrefslogtreecommitdiffstats
path: root/IRC
diff options
context:
space:
mode:
authorlassulus <lassulus@googlemail.com>2014-01-22 03:02:55 +0100
committerlassulus <lassulus@googlemail.com>2014-01-22 03:02:55 +0100
commit1b322fd7067e7f226b98edaf2e3d22e56469ed71 (patch)
tree7e4f92c9b8d05c183d997d6d38364b16ea84e3bc /IRC
parent086dfeb9563840e0dcba8c1faf2143e5a8e94511 (diff)
news/ircasy: handle kick correctly
Diffstat (limited to 'IRC')
-rw-r--r--IRC/ircasy.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/IRC/ircasy.py b/IRC/ircasy.py
index 7821305..e32179b 100644
--- a/IRC/ircasy.py
+++ b/IRC/ircasy.py
@@ -107,6 +107,9 @@ class asybot(asychat):
elif command == 'INVITE':
self.on_invite(prefix, command, params, rest)
+ elif command == 'KICK':
+ self.on_kick(prefix, command, params, rest)
+
elif command == '433':
# ERR_NICKNAMEINUSE, retry with another name
_, nickname, int, _ = split('^.*[^0-9]([0-9]+)$', self.nickname) \
@@ -158,11 +161,15 @@ 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))
+ def on_kick(self, prefix, command, params, rest):
+ for chan in params:
+ self.channels.remove(chan)
+
+ def on_privmsg(self, prefix, command, params, rest):
+ pass
+
def on_invite(self, prefix, command, params, rest):
pass