home · contact · privacy
Don't use negative indices on Update.full_path, could hit other steps than we expect. master
authorChristian Heller <c.heller@plomlompom.de>
Tue, 25 Nov 2025 15:48:25 +0000 (16:48 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 25 Nov 2025 15:48:25 +0000 (16:48 +0100)
src/ircplom/client_tui.py

index 9c473029954cf1d85935c77736efbbca6879328c..4080f2b227fdb0d04f10ad9d3995a3873456a104 100644 (file)
@@ -297,7 +297,7 @@ class _UpdatingChannel(_UpdatingNode, Channel):
             return tuple(id_ for id_ in base if id_ not in excluder)
 
         super().recursive_set_and_report_change(update)
-        if update.full_path[-2] == 'prefixes' and self.user_ids:
+        if update.full_path[2] == 'prefixes' and self.user_ids:
             update.results += [
                     (_LogScope.CHAT, [f'NICK:{id_}', f': gains {update.key}'])
                     for id_ in diff_in(update.value, update.old_value)]