home · contact · privacy
For update loggings, differentiate Dict zero-ing vs other emptyings.
authorChristian Heller <c.heller@plomlompom.de>
Thu, 20 Nov 2025 08:47:01 +0000 (09:47 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 20 Nov 2025 08:47:01 +0000 (09:47 +0100)
src/ircplom/client_tui.py
src/tests/channels.test
src/tests/test.test

index ef62f571acf5f7e1c1601018b0fed4b3e3119e7c..a04bca4a7585fd7a238c765c18cad328f40dc7d0 100644 (file)
@@ -233,7 +233,9 @@ class _UpdatingNode(AutoAttrMixin):
         result = (tuple(sorted(update.value)) if isinstance(update.value, set)
                   else update.value)
         announcement = ':' + ':'.join(update.full_path) + ' '
-        if result in (None, tuple()):
+        if result == tuple():
+            announcement += 'emptied'
+        elif result is None:
             announcement += 'cleared'
         else:
             announcement += 'set to: '
index 53b2b5e8d27711f58f739b89b5796f31fdd4d73d..c44349e550534c8e32d2656d0390e52ab4de12f4 100644 (file)
@@ -20,7 +20,7 @@ insert ./lib/user-set-to
 insert ./lib/usermode
 
 × part-empty
-insert part : + USERIDS_CLEAR :cleared
+insert part : + USERIDS_CLEAR :emptied
 
 × topic-set-to
 log 1 $ channels:CHANNEL:topic set to: [Topic(what='NEWTOPIC', who=NickUserHost(nick='baz', user='~baz', host='baz.baz'))]
index a029efe5602d4255e2a2f04b3d90d42df830ece6..b5209b5aba7718885dd46cc1ce83fa97d5ef4724 100644 (file)
@@ -163,10 +163,10 @@ insert no-handler : +0 ALERT_WIN_IDS=2,3,4,5,6,7 ? :foo bar baz
 # handle /disconnect, clear all
 insert cmd-disconnect-0 :-1
 log 3,6,7 $ foo!~baz@baz.bar.foo quits: Client Quit
-insert quits : + CHAN_WIN_ID=5 CHANNEL=#testtest USER_ID=me NICK=foo foo@foo.foo=baz@baz.bar.foo USERIDS_CLEAR :cleared
+insert quits : + CHAN_WIN_ID=5 CHANNEL=#testtest USER_ID=me NICK=foo foo@foo.foo=baz@baz.bar.foo USERIDS_CLEAR :emptied
 insert cmd-disconnect-1 : +0
 insert disconnect1 :-1 +1 WIN_IDS :2,3,4,5,6,7
-log 1 $ motd cleared
+log 1 $ motd emptied
 log 1 $ users cleared
 
 # fail to send in disconnect, check alert window is command prompt window