home · contact · privacy
Re-instate parsing of 001 for determining our nickname.
authorChristian Heller <c.heller@plomlompom.de>
Wed, 13 Aug 2025 13:37:39 +0000 (15:37 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 13 Aug 2025 13:37:39 +0000 (15:37 +0200)
ircplom/client.py

index 49006edd22d846bdda4ed1be6efa0d5075488616..96c40c2c90f31aff168456f323ed7275574d3678 100644 (file)
@@ -306,7 +306,9 @@ class Client(ABC, ClientQueueMixin):
         'Log msg.raw, then process incoming msg into appropriate client steps.'
         self._log(msg.raw, scope=LogScope.RAW, out=False)
         match msg.verb:
-            case '001' | '002' | '003' | '004':
+            case '001' | 'NICK':
+                self._update_db('nickname', value=msg.params[0], confirm=True)
+            case '002' | '003' | '004':
                 pass  # explicitly ignored verbs/numerics
             case '375':
                 self._db.set('motd', [], False)
@@ -324,8 +326,6 @@ class Client(ABC, ClientQueueMixin):
                 self.send(IrcMessage(verb='PONG', params=(msg.params[0],)))
             case 'ERROR':
                 self.close()
-            case '001' | 'NICK':
-                self._update_db('nickname', value=msg.params[0], confirm=True)
             case 'NOTICE' | 'PRIVMSG':
                 scope = LogScope.CHAT if '!' in msg.source else LogScope.SERVER
                 self._log(msg.params[-1], scope=scope, channel=msg.params[0],