From b2c4f80d732e83d067ad979069952ee8bd6afadf Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sat, 20 Sep 2025 01:39:13 +0200 Subject: [PATCH] Remove debugging windows from LogScope.ALL, thus CONNECTED/DISCONNECTED. --- ircplom/client_tui.py | 3 ++- test.txt | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ircplom/client_tui.py b/ircplom/client_tui.py index 9a5cf8a..a922560 100644 --- a/ircplom/client_tui.py +++ b/ircplom/client_tui.py @@ -396,7 +396,8 @@ class ClientTui(BaseTui): if scope != LogScope.SAME: m = self._client_mngrs[kwargs['client_id']] if scope == LogScope.ALL: - return m.windows + return [w for w in m.windows + if w.scope not in {LogScope.SERVER, LogScope.RAW}] if scope == LogScope.SERVER: return [m.window(LogScope.SERVER), m.window(LogScope.RAW)] if scope == LogScope.CHAT: diff --git a/test.txt b/test.txt index 3bb10c6..d98e2ec 100644 --- a/test.txt +++ b/test.txt @@ -44,7 +44,7 @@ # on /connect init databases, log in new windows > /connect foo.bar.baz foo:bar foobarbazquux:baz -1,2 $ DISCONNECTED +, $ DISCONNECTED 1,2 $ isupport cleared 1,2 $ isupport:CHANTYPES set to: [#&] 1,2 $ isupport:PREFIX set to: [(ov)@+] @@ -63,7 +63,7 @@ 1,2 $ port set to: [6697] 1,2 $ connection_state set to: [connecting] 1,2 $ connection_state set to: [connected] -1,2 $ CONNECTED +, $ CONNECTED 2 > CAP LS :302 2 > USER foobarbazquux 0 * :baz 2 > NICK :foo @@ -327,7 +327,7 @@ 2 < ERROR :Closing link: (~foobarbaz@baz.bar.foo) [Quit: ircplom says bye] 1,2 $ connection_state set to: [Closing link: (~foobarbaz@baz.bar.foo) [Quit: ircplom says bye]] 1,2 $ connection_state set to: [] -1,2,3,4,5,6 $ DISCONNECTED +3,4,5,6 $ DISCONNECTED 1,2 $ isupport cleared 1,2 $ isupport:CHANTYPES set to: [#&] 1,2 $ isupport:PREFIX set to: [(ov)@+] @@ -342,7 +342,7 @@ # check that (save TUI tests assuming start on window 0, and no 4 yet) on reconnect, all the same effects can be expected > /reconnect repeat 63:65 -1,2,3,4,5,6 $ CONNECTED +3,4,5,6 $ CONNECTED repeat 66:147 repeat 159:341 -- 2.30.2