summaryrefslogtreecommitdiffstats
path: root/Reaktor/IRC
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2014-02-26 23:03:34 +0100
committermakefu <github@syntax-fehler.de>2014-02-26 23:03:34 +0100
commit9ac3dfec03ffe45bd5a91bb05f233482d078556c (patch)
treec74a3e8e3ea3b2424714030306bdc5548469142e /Reaktor/IRC
parentd818d26256380d1be91cb3d449271da96adb2105 (diff)
parentf81f2f75d7fd19680a21b7d4d2b54d1e16559ab8 (diff)
Merge branch 'master' of ssh://github.com/krebscode/painload
Diffstat (limited to 'Reaktor/IRC')
-rw-r--r--Reaktor/IRC/ircasy.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/Reaktor/IRC/ircasy.py b/Reaktor/IRC/ircasy.py
index 150498dd..fd261ae9 100644
--- a/Reaktor/IRC/ircasy.py
+++ b/Reaktor/IRC/ircasy.py
@@ -112,11 +112,7 @@ class asybot(asychat):
elif command == '433':
# ERR_NICKNAMEINUSE, retry with another name
- _, nickname, int, _ = split('^.*[^0-9]([0-9]+)$', self.nickname) \
- if search('[0-9]$', self.nickname) \
- else ['', self.nickname, 0, '']
- self.nickname = nickname + str(int + 1)
- self.handle_connect()
+ self.on_nickinuse(prefix, command, params, rest)
elif command == '376':
self.on_welcome(prefix, command, params, rest)
@@ -175,3 +171,10 @@ class asybot(asychat):
def on_invite(self, prefix, command, params, rest):
pass
+
+ def on_nickinuse(self, prefix, command, params, rest):
+ _, nickname, int, _ = split('^.*[^0-9]([0-9]+)$', self.nickname) \
+ if search('[0-9]$', self.nickname) \
+ else ['', self.nickname, 0, '']
+ self.nickname = nickname + str(int + 1)
+ self.handle_connect()