home · contact · privacy
Minor code simplification.
authorChristian Heller <c.heller@plomlompom.de>
Tue, 25 Nov 2025 13:22:18 +0000 (14:22 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 25 Nov 2025 13:22:18 +0000 (14:22 +0100)
src/ircplom/client_tui.py

index 6aa3558af6301cd948d3db4a6757a63ae52e132f..5ac53a153912f5fc4f4835f1083a5d7b59b840f2 100644 (file)
@@ -325,18 +325,14 @@ class _UpdatingUser(_UpdatingNode, User):
 
     def recursive_set_and_report_change(self, update: _Update) -> None:
         super().recursive_set_and_report_change(update)
-        if update.key in {'nick', 'exit_msg'}:
-            if update.key == 'nick':
-                self.prev_nick = update.old_value
-                if update.old_value != '?':
-                    update.results += [
-                        (_LogScope.USER,
-                         [f':{self.prev} renames {update.value}'])]
-            elif update.key == 'exit_msg':
-                if update.value:
-                    update.results += [(_LogScope.USER_NO_CHANNELS,
-                                        self.exit_msg_toks(
-                                            f':{self}', update.value))]
+        if update.key == 'nick':
+            self.prev_nick = update.old_value
+            if update.old_value != '?':
+                update.results += [(_LogScope.USER,
+                                    [f':{self.prev} renames {update.value}'])]
+        elif update.key == 'exit_msg' and update.value:
+            update.results += [(_LogScope.USER_NO_CHANNELS,
+                                self.exit_msg_toks(f':{self}', update.value))]
 
     @property
     def prev(self) -> str: