Store new nickname on 401 ERR_NICKINUSE

This commit is contained in:
Dionysus 2023-06-17 23:24:35 -04:00
parent 349a74b79e
commit 0325e73ebf
Signed by: acidvegas
GPG Key ID: EF4B922DB85DC9DE
1 changed files with 2 additions and 4 deletions

View File

@ -385,10 +385,8 @@ class probe:
if 'You must be connected for' in msg:
error(self.display + '\033[31merror\033[0m - delay found', msg)
elif event == '433': # ERR_NICKINUSE
if not settings.nickname:
await self.raw('NICK ' + rndnick())
else:
await self.raw('NICK ' + settings.nickname + str(random.randint(1000,9999)))
self.nickanme = rndnick()
await self.raw('NICK ' + self.nickname)
elif event == '439' and len(args) >= 5: # ERR_TARGETTOOFAST
chan = args[3]
msg = ' '.join(args[4:])[1:]