From 9390ad6155e9883d524c3a5f21769b5d311d3850 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 15 Mar 2014 01:17:29 +0100 Subject: ircasy: fix nickinuse --- IRC/ircasy.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/IRC/ircasy.py b/IRC/ircasy.py index 4dfff39..5a07e8f 100644 --- a/IRC/ircasy.py +++ b/IRC/ircasy.py @@ -178,7 +178,8 @@ class asybot(asychat): def on_nickinuse(self, prefix, command, params, rest): regex = re.search('(\d+)$', self.nickname) if regex: - theint = int(regex.group(0)) - self.nickname = self.nickname.strip(theint) + str(theint + 1) - else self.nickname = self.nickname + '0' + theint = int(regex.group(0)) + self.nickname = self.nickname.strip(theint) + str(theint + 1) + else: + self.nickname = self.nickname + '0' self.handle_connect() -- cgit v1.2.3