From 1f73cc654217e9b5531d3d73a2f0f68cc51f3eb3 Mon Sep 17 00:00:00 2001 From: acidvegas Date: Wed, 31 May 2023 00:59:18 -0400 Subject: [PATCH] Added 487 (ERR_MSGSERVICES) handling to attempt to register a nick again --- ircp.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ircp.py b/ircp.py index 91510ff..8c0bc53 100644 --- a/ircp.py +++ b/ircp.py @@ -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: