From ddeeda4d2580af82057afcc935a0fe0e74031401 Mon Sep 17 00:00:00 2001 From: acidvegas Date: Wed, 31 May 2023 01:21:01 -0400 Subject: [PATCH] Added detection & logging for succesful nick registrations with NickServ --- ircp.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/ircp.py b/ircp.py index 3c998f8..48c808a 100644 --- a/ircp.py +++ b/ircp.py @@ -41,15 +41,16 @@ donotscan = ( ) snapshot = { - 'server' : None, - 'host' : None, - 'services' : False, - 'ssl' : False, - 'proxy' : False, - 'raw' : [], # all other data goes in here - 'CAP' : None, - 'KILL' : None, # TODO: currently does not verify it was us being killed - 'NOTICE' : None, + 'server' : None, + 'host' : None, + 'services' : False, + 'registered' : False, + 'ssl' : False, + 'proxy' : False, + 'raw' : [], # all other data goes in here + 'CAP' : None, + 'KILL' : None, # TODO: currently does not verify it was us being killed + 'NOTICE' : None, # server information '001' : None, # RPL_WELCOME @@ -438,6 +439,9 @@ class probe: await self.raw(f'NOTICE {nick} \001VERSION {version}\001') elif nick == 'NickServ': self.snapshot['services'] = True + if 'is now registered' in msg or f'Nickname {self.nickname} registered' in msg: + debug(self.display + '\033[35mNickServ\033[0m registered') + self.snapshot['registered'] = True elif '!' not in args[0]: if 'dronebl.org/lookup' in msg: self.snapshot['proxy'] = True