From e0ea5f927f344767118d5dd3bcf83498bf9e6d0c Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Tue, 19 Aug 2025 04:54:44 +0200 Subject: [PATCH] Handle 401 for query windows. --- ircplom/client.py | 5 +++++ 1 file changed, 5 insertions(+) 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] == '*': -- 2.30.2