From: Christian Heller Date: Thu, 14 Aug 2025 12:01:34 +0000 (+0200) Subject: Handle 396 numeric. X-Git-Url: https://plomlompom.com/repos/booking/conditions?a=commitdiff_plain;h=8839d94988476ba6694c9d3c9d359254e906cc02;p=ircplom Handle 396 numeric. --- diff --git a/ircplom/client.py b/ircplom/client.py index bd71e6a..3eea886 100644 --- a/ircplom/client.py +++ b/ircplom/client.py @@ -22,6 +22,7 @@ _NUMERICS_TO_CONFIRM_NICKNAME = ( (265, 266), 372, (375, 376), + 396, ) _NUMERICS_TO_IGNORE = ( (1, 4), # nothing in this login info we're interested in @@ -354,6 +355,11 @@ class Client(ABC, ClientQueueMixin): self._db.append('motd', msg.params[-1]) case '376': # RPL_ENDOFMOTD self._update_db('motd', None, True) + case '396': # RPL_VISIBLEHOST/RPL_YOURDISPLAYEDHOST/RPL_HOSTHIDDEN + # '@'-split because + # claims: " can also be in the form " + self._update_db('client_host', confirm=True, + value=msg.params[1].split('@')[-1]) case 'PING': self.send(IrcMessage(verb='PONG', params=(msg.params[0],))) case 'ERROR':