From: Christian Heller Date: Tue, 19 Aug 2025 02:54:44 +0000 (+0200) Subject: Handle 401 for query windows. X-Git-Url: https://plomlompom.com/repos/blog?a=commitdiff_plain;h=e0ea5f927f344767118d5dd3bcf83498bf9e6d0c;p=ircplom Handle 401 for query windows. --- diff --git a/ircplom/client.py b/ircplom/client.py index df2fc7d..d1c2dee 100644 --- a/ircplom/client.py +++ b/ircplom/client.py @@ -26,6 +26,7 @@ _NUMERICS_TO_CONFIRM_NICKNAME = ( 372, (375, 376), 396, + 401, 900, 903, 904 @@ -52,6 +53,7 @@ _EXPECTATIONS: dict[str, _MsgParseExpectation] = { '372': _MsgParseExpectation(2), '376': _MsgParseExpectation(2), '396': _MsgParseExpectation(3), + '401': _MsgParseExpectation(3), '432': _MsgParseExpectation(3), '433': _MsgParseExpectation(3), '900': _MsgParseExpectation(4), @@ -588,6 +590,9 @@ class Client(ABC, ClientQueueMixin): # '@'-split because # claims: " can also be in the form " self._db.client_host = msg.params[1].split('@')[-1] + elif msg.match('401'): # ERR_NOSUCHNICK + self._log(f'{msg.params[1]} not online', scope=LogScope.CHAT, + target=msg.params[1], alert=True) elif msg.match('432'): # ERR_ERRONEOUSNICKNAME alert = 'nickname refused for bad format' if msg.params[0] == '*':