home · contact · privacy
Fix other users' nick changes being registered as our own.
authorChristian Heller <c.heller@plomlompom.de>
Mon, 18 Aug 2025 23:10:19 +0000 (01:10 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Mon, 18 Aug 2025 23:10:19 +0000 (01:10 +0200)
ircplom/client.py

index b4314fba084a3a69ddf91d1d27f6eb62fc1268f2..e648ea6b6a9f38027ce6fc1604dbb544d0400f87 100644 (file)
@@ -387,7 +387,7 @@ class SharedClientDbFields(IrcConnSetup):
     sasl_account: str
     sasl_auth_state: str
     user_modes: str
-    username: str = ''
+    username: str
 
 
 class _ClientDb(_Db, SharedClientDbFields):
@@ -582,7 +582,7 @@ class Client(ABC, ClientQueueMixin):
             self.close()
         elif msg.match('MODE', 2) and msg.params[0] == self._db.nickname:
             self._db.user_modes = msg.params[1]
-        elif msg.match('NICK'):
+        elif msg.match('NICK') and msg.nick_from_source == self._db.nickname:
             self.set_nick(msg.params[0], confirmed=True)
         elif msg.match('NOTICE', 2) or msg.match('PRIVMSG', 2):
             scope = LogScope.CHAT if '!' in msg.source else LogScope.SERVER