1
mirror of git://git.acid.vegas/IRCP.git synced 2024-12-28 17:36:37 +00:00

Added 487 (ERR_MSGSERVICES) handling to attempt to register a nick again

This commit is contained in:
Dionysus 2023-05-31 00:59:18 -04:00
parent 3a6e94bbe0
commit 1f73cc6542
Signed by: acidvegas
GPG Key ID: EF4B922DB85DC9DE

View File

@ -402,6 +402,13 @@ class probe:
raise Exception('K-Lined')
elif numeric == '464': # ERR_PASSWDMISMATCH
raise Exception('Network has a password')
elif numeric == '487': # ERR_MSGSERVICES
if '"/msg NickServ" is no longer supported' in line:
login = {
'pass': settings.ns_pass if settings.ns_pass else rndnick(),
'mail': settings.ns_mail if settings.ns_mail else f'{rndnick()}@{rndnick()}.'+random.choice(('com','net','org'))
}
await self.raw('/NickServ REGISTER {0} {1}'.format(login['pass'], login['mail']))
elif numeric == 'KILL':
nick = args[2]
if nick == self.nickname: