From 1238fdbd00fca3136b95127ae9dd911e180749e9 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Wed, 24 Sep 2025 05:22:01 +0200 Subject: [PATCH] Fuse debugging windows / remove the one without the raw protocol logging. --- ircplom/client_tui.py | 8 +- test.txt | 549 +++++++++++++++++++++--------------------- 2 files changed, 277 insertions(+), 280 deletions(-) diff --git a/ircplom/client_tui.py b/ircplom/client_tui.py index 5a3ed18..cd3e964 100644 --- a/ircplom/client_tui.py +++ b/ircplom/client_tui.py @@ -319,7 +319,6 @@ class _ClientWindowsManager: self._tui_new_window = tui_new_window self.db = _TuiClientDb() self.windows: list[_ClientWindow] = [] - self._new_win(_LogScope.DEBUG) def _new_win(self, scope: _LogScope, chatname: str = '') -> _ClientWindow: kwargs = {'scope': scope, 'win_cls': _ClientWindow} @@ -342,10 +341,9 @@ class _ClientWindowsManager: ret = [w for w in self.windows if w not in self.windows_for(_LogScope.DEBUG)] elif scope == _LogScope.RAW: - ret = [w for w in self.windows if w.scope == _LogScope.RAW] + ret = self.windows_for(_LogScope.DEBUG) elif scope == _LogScope.DEBUG: - ret = self.windows_for(_LogScope.RAW)\ - + [w for w in self.windows if w.scope == _LogScope.DEBUG] + ret = [w for w in self.windows if w.scope == _LogScope.DEBUG] elif scope == _LogScope.CHAT: ret = [w for w in self.windows if isinstance(w, _ChatWindow) and w.chatname == id_] @@ -362,7 +360,7 @@ class _ClientWindowsManager: elif scope == _LogScope.USER_NO_CHANNELS: ret = [w for w in self.windows_for(_LogScope.USER, id_) if isinstance(w, _QueryWindow)] - if (not ret) and scope in {_LogScope.CHAT, _LogScope.RAW}: + if (not ret) and scope in {_LogScope.CHAT, _LogScope.DEBUG}: ret += [self._new_win(scope, id_)] ret.sort(key=lambda w: w.idx) return ret diff --git a/test.txt b/test.txt index 73b5a75..482b641 100644 --- a/test.txt +++ b/test.txt @@ -45,116 +45,116 @@ # on /connect init databases, log in new windows > /connect foo.bar.baz foo:bar foobarbazquux:baz , $ DISCONNECTED -1,2 $ isupport cleared -1,2 $ isupport:CHANTYPES set to: [#&] -1,2 $ isupport:PREFIX set to: [(ov)@+] -1,2 $ isupport:USERLEN set to: [10] -1,2 $ caps cleared -1,2 $ users cleared -1,2 $ channels cleared +1 $ isupport cleared +1 $ isupport:CHANTYPES set to: [#&] +1 $ isupport:PREFIX set to: [(ov)@+] +1 $ isupport:USERLEN set to: [10] +1 $ caps cleared +1 $ users cleared +1 $ channels cleared # connect with values set by /connect, init CAP negotation -1,2 $ hostname set to: [foo.bar.baz] -1,2 $ port set to: [-1] -1,2 $ nick_wanted set to: [foo] -1,2 $ user_wanted set to: [foobarbazquux] -1,2 $ realname set to: [baz] -1,2 $ password set to: [bar] -1,2 $ port set to: [6697] -1,2 $ connection_state set to: [connecting] -1,2 $ connection_state set to: [connected] +1 $ hostname set to: [foo.bar.baz] +1 $ port set to: [-1] +1 $ nick_wanted set to: [foo] +1 $ user_wanted set to: [foobarbazquux] +1 $ realname set to: [baz] +1 $ password set to: [bar] +1 $ port set to: [6697] +1 $ connection_state set to: [connecting] +1 $ connection_state set to: [connected] , $ CONNECTED -2 > CAP LS :302 -2 > USER foobarbazquux 0 * :baz -2 > NICK :foo +1 > CAP LS :302 +1 > USER foobarbazquux 0 * :baz +1 > NICK :foo # expect some NOTICE and PING to process/reply during initiation -0:2 < :*.?.net NOTICE * :*** Looking up your ident... -3 <<< [ server] *** Looking up your ident... -0:2 < :*.?.net NOTICE * :*** Looking up your hostname... -3 <<< [ server] *** Looking up your hostname... -0:2 < :*.?.net NOTICE * :*** Found your hostname (baz.bar.foo) -3 <<< [ server] *** Found your hostname (baz.bar.foo) -0:2 < PING :? -2 > PONG :? +0:1 < :*.?.net NOTICE * :*** Looking up your ident... +2 <<< [ server] *** Looking up your ident... +0:1 < :*.?.net NOTICE * :*** Looking up your hostname... +2 <<< [ server] *** Looking up your hostname... +0:1 < :*.?.net NOTICE * :*** Found your hostname (baz.bar.foo) +2 <<< [ server] *** Found your hostname (baz.bar.foo) +0:1 < PING :? +1 > PONG :? # handle 433 -0:2 < :*.?.net 433 * foo :Nickname already in use -1,2 !$ nickname already in use, trying increment -2 > NICK :foo0 -0:2 < :*.?.net 433 * foo0 :Nickname already in use -1,2 !$ nickname already in use, trying increment -2 > NICK :foo1 +0:1 < :*.?.net 433 * foo :Nickname already in use +1 !$ nickname already in use, trying increment +1 > NICK :foo0 +0:1 < :*.?.net 433 * foo0 :Nickname already in use +1 !$ nickname already in use, trying increment +1 > NICK :foo1 # collect server capabilities -0:2 < :*.?.net CAP * LS : foo bar sasl=PLAIN,EXTERNAL baz -2 > CAP REQ :sasl -2 > CAP :LIST -0:2 < :*.?.net CAP * ACK :sasl -0:2 < :*.?.net CAP * LIST :cap-notify sasl -1,2 $ caps:bar:data set to: [] -1,2 $ caps:baz:data set to: [] -1,2 $ caps:foo:data set to: [] -1,2 $ caps:sasl:data set to: [] -1,2 $ caps:sasl:data set to: [PLAIN,EXTERNAL] -1,2 $ caps:sasl:enabled set to: [True] +0:1 < :*.?.net CAP * LS : foo bar sasl=PLAIN,EXTERNAL baz +1 > CAP REQ :sasl +1 > CAP :LIST +0:1 < :*.?.net CAP * ACK :sasl +0:1 < :*.?.net CAP * LIST :cap-notify sasl +1 $ caps:bar:data set to: [] +1 $ caps:baz:data set to: [] +1 $ caps:foo:data set to: [] +1 $ caps:sasl:data set to: [] +1 $ caps:sasl:data set to: [PLAIN,EXTERNAL] +1 $ caps:sasl:enabled set to: [True] # authenticate via SASL, collect items of user identity -1,2 $ sasl_auth_state set to: [attempting] -2 > AUTHENTICATE :PLAIN -0:2 < AUTHENTICATE + -2 > AUTHENTICATE :Zm9vAGZvbwBiYXI= -0:2 < :foo.bar.baz 900 foo1 foo1!foobarbazq@baz.bar.foo foo :You are now logged in as foo -1,2 $ users:me:nick set to: [?] -1,2 $ users:me:nick set to: [foo1] -1,2 $ users:me:user set to: [foobarbazq] -1,2 $ users:me:host set to: [baz.bar.foo] -1,2 $ sasl_account set to: [foo] -0:2 < :foo.bar.baz 903 foo1 :SASL authentication successful -1,2 $ sasl_auth_state set to: [SASL authentication successful] +1 $ sasl_auth_state set to: [attempting] +1 > AUTHENTICATE :PLAIN +0:1 < AUTHENTICATE + +1 > AUTHENTICATE :Zm9vAGZvbwBiYXI= +0:1 < :foo.bar.baz 900 foo1 foo1!foobarbazq@baz.bar.foo foo :You are now logged in as foo +1 $ users:me:nick set to: [?] +1 $ users:me:nick set to: [foo1] +1 $ users:me:user set to: [foobarbazq] +1 $ users:me:host set to: [baz.bar.foo] +1 $ sasl_account set to: [foo] +0:1 < :foo.bar.baz 903 foo1 :SASL authentication successful +1 $ sasl_auth_state set to: [SASL authentication successful] # finish CAP negotation, thus login procedure -2 > CAP :END +1 > CAP :END # of all pre-MOTD greeting messages, only process isupports -0:2 < :foo.bar.baz 001 foo1 :Welcome to the foo.bar.baz network -0:2 < :foo.bar.baz 002 foo1 :Your host is foo.bar.baz -0:2 < :foo.bar.baz 003 foo1 :This server was created Jan 1 2020 -0:2 < :foo.bar.baz 004 foo1 foo.bar.baz ircserver-1.0 abc def ghi -0:2 < :foo.bar.baz 005 foo1 ABC=DEF GHI=JKL :are supported by this server -1,2 $ isupport:ABC set to: [DEF] -1,2 $ isupport:GHI set to: [JKL] -0:2 < :foo.bar.baz 005 foo1 MNO=PQR STU=VWX Y=Z :are supported by this server -1,2 $ isupport:MNO set to: [PQR] -1,2 $ isupport:STU set to: [VWX] -1,2 $ isupport:Y set to: [Z] -0:2 < :foo.bar.baz 251 foo1 :There are 10 users and 1000 invisible on 5 servers -0:2 < :foo.bar.baz 252 foo1 7 :IRC Operators online -0:2 < :foo.bar.baz 253 foo1 4 :unknown connection(s) -0:2 < :foo.bar.baz 254 foo1 800 :channels formed -0:2 < :foo.bar.baz 255 foo1 :I have 100 clients and 1 serveres -0:2 < :foo.bar.baz 265 foo1 100 150 :Current local users 100, max 150 -0:2 < :foo.bar.baz 266 foo1 1010 1050 :Current global users 1010, max 1050 -0:2 < :foo.bar.baz 250 foo1 :Highest connection count: 151 (150 clients) (1080 connections received) +0:1 < :foo.bar.baz 001 foo1 :Welcome to the foo.bar.baz network +0:1 < :foo.bar.baz 002 foo1 :Your host is foo.bar.baz +0:1 < :foo.bar.baz 003 foo1 :This server was created Jan 1 2020 +0:1 < :foo.bar.baz 004 foo1 foo.bar.baz ircserver-1.0 abc def ghi +0:1 < :foo.bar.baz 005 foo1 ABC=DEF GHI=JKL :are supported by this server +1 $ isupport:ABC set to: [DEF] +1 $ isupport:GHI set to: [JKL] +0:1 < :foo.bar.baz 005 foo1 MNO=PQR STU=VWX Y=Z :are supported by this server +1 $ isupport:MNO set to: [PQR] +1 $ isupport:STU set to: [VWX] +1 $ isupport:Y set to: [Z] +0:1 < :foo.bar.baz 251 foo1 :There are 10 users and 1000 invisible on 5 servers +0:1 < :foo.bar.baz 252 foo1 7 :IRC Operators online +0:1 < :foo.bar.baz 253 foo1 4 :unknown connection(s) +0:1 < :foo.bar.baz 254 foo1 800 :channels formed +0:1 < :foo.bar.baz 255 foo1 :I have 100 clients and 1 serveres +0:1 < :foo.bar.baz 265 foo1 100 150 :Current local users 100, max 150 +0:1 < :foo.bar.baz 266 foo1 1010 1050 :Current global users 1010, max 1050 +0:1 < :foo.bar.baz 250 foo1 :Highest connection count: 151 (150 clients) (1080 connections received) # collect MOTD into a single output (rather than line-by-line) -0:2 < :foo.bar.baz 375 foo1 :- foo.bar.baz Message of the Day - -0:2 < :foo.bar.baz 372 foo1 :- Howdy! - -0:2 < :foo.bar.baz 372 foo1 :- Welcome! - -0:2 < :foo.bar.baz 372 foo1 :- (to this server) - -0:2 < :foo.bar.baz 376 foo1 :End of /MOTD command -1,2 $ motd set to: -1,2 $ - Howdy! - -1,2 $ - Welcome! - -1,2 $ - (to this server) - +0:1 < :foo.bar.baz 375 foo1 :- foo.bar.baz Message of the Day - +0:1 < :foo.bar.baz 372 foo1 :- Howdy! - +0:1 < :foo.bar.baz 372 foo1 :- Welcome! - +0:1 < :foo.bar.baz 372 foo1 :- (to this server) - +0:1 < :foo.bar.baz 376 foo1 :End of /MOTD command +1 $ motd set to: +1 $ - Howdy! - +1 $ - Welcome! - +1 $ - (to this server) - # collect user mode -0:2 < :foo1 MODE foo1 :+Ziw -1,2 $ users:me:modes set to: [+Ziw] +0:1 < :foo1 MODE foo1 :+Ziw +1 $ users:me:modes set to: [+Ziw] # handle bot query NOTICE -0:2 < :SaslServ!SaslServ@services.bar.baz NOTICE foo1 :Last login from ~foobarbaz@foo.bar.baz on Jan 1 22:00:00 2021 +0000. -4 <<< [SaslServ] Last login from ~foobarbaz@foo.bar.baz on Jan 1 22:00:00 2021 +0000. +0:1 < :SaslServ!SaslServ@services.bar.baz NOTICE foo1 :Last login from ~foobarbaz@foo.bar.baz on Jan 1 22:00:00 2021 +0000. +3 <<< [SaslServ] Last login from ~foobarbaz@foo.bar.baz on Jan 1 22:00:00 2021 +0000. # check difference in available commands when switching to client window > /join #test @@ -163,9 +163,8 @@ 0 # windows available via /window: 0 # 0) :start 0 # 1) foo.bar.baz :DEBUG -0 # 2) foo.bar.baz :RAW -0 # 3) foo.bar.baz server -0 # 4) foo.bar.baz SaslServ +0 # 2) foo.bar.baz server +0 # 3) foo.bar.baz SaslServ > /window 1 > /help 1 # commands available in this window: @@ -194,152 +193,152 @@ 1 # /window.reconnect # test lack of implementation -0:2 < foo bar baz -1,2 !$ No handler implemented for: foo bar baz +0:1 < foo bar baz +1 !$ No handler implemented for: foo bar baz # test recoverable 432 > /nick @foo -2 > NICK :@foo -0:2 < :*.?.net 432 foo1 @foo :Erroneous nickname -1,2 !$ nickname refused for bad format +1 > NICK :@foo +0:1 < :*.?.net 432 foo1 @foo :Erroneous nickname +1 !$ nickname refused for bad format # join channel, collect topic, residents; update me:user from JOIN message > /join #test -2 > JOIN :#test -0:2 < :foo1!~foobarbaz@baz.bar.foo JOIN #test -1,2 $ users:me:user set to: [~foobarbaz] -0:2 < :foo.bar.baz 332 foo1 #test :foo bar baz -1,2 $ channels:#test:exits cleared -0:2 < :foo.bar.baz 333 foo1 #test bar!~bar@bar.bar 1234567890 -1,2 $ channels:#test:topic set to: [Topic(what='foo bar baz', who=NickUserHost(nick='bar', user='~bar', host='bar.bar'))] -5 $ bar!~bar@bar.bar set topic: foo bar baz -0:2 < :foo.bar.baz 353 foo1 @ #test :foo1 @bar -1,2 $ users:1:nick set to: [?] -1,2 $ users:1:nick set to: [bar] -0:2 < :foo.bar.baz 366 foo1 #test :End of /NAMES list. -1,2 $ channels:#test:user_ids set to: -1,2 $ 1 -1,2 $ me -5 $ residents: bar, foo1 +1 > JOIN :#test +0:1 < :foo1!~foobarbaz@baz.bar.foo JOIN #test +1 $ users:me:user set to: [~foobarbaz] +0:1 < :foo.bar.baz 332 foo1 #test :foo bar baz +1 $ channels:#test:exits cleared +0:1 < :foo.bar.baz 333 foo1 #test bar!~bar@bar.bar 1234567890 +1 $ channels:#test:topic set to: [Topic(what='foo bar baz', who=NickUserHost(nick='bar', user='~bar', host='bar.bar'))] +4 $ bar!~bar@bar.bar set topic: foo bar baz +0:1 < :foo.bar.baz 353 foo1 @ #test :foo1 @bar +1 $ users:1:nick set to: [?] +1 $ users:1:nick set to: [bar] +0:1 < :foo.bar.baz 366 foo1 #test :End of /NAMES list. +1 $ channels:#test:user_ids set to: +1 $ 1 +1 $ me +4 $ residents: bar, foo1 # deliver PRIVMSG to channel window, update sender's user+host from metadata -0:2 < :bar!~bar@bar.bar PRIVMSG #test :hi there -1,2 $ users:1:user set to: [~bar] -1,2 $ users:1:host set to: [bar.bar] -5 < [bar] hi there +0:1 < :bar!~bar@bar.bar PRIVMSG #test :hi there +1 $ users:1:user set to: [~bar] +1 $ users:1:host set to: [bar.bar] +4 < [bar] hi there # check _changing_ TOPIC message is communicated to channel window -0:2 < :bar!~bar@bar.bar TOPIC #test :foo bar baz -0:2 < :bar!~bar@bar.bar TOPIC #test :abc def ghi -1,2 $ channels:#test:topic set to: [Topic(what='abc def ghi', who=NickUserHost(nick='bar', user='~bar', host='bar.bar'))] -5 $ bar!~bar@bar.bar set topic: abc def ghi +0:1 < :bar!~bar@bar.bar TOPIC #test :foo bar baz +0:1 < :bar!~bar@bar.bar TOPIC #test :abc def ghi +1 $ channels:#test:topic set to: [Topic(what='abc def ghi', who=NickUserHost(nick='bar', user='~bar', host='bar.bar'))] +4 $ bar!~bar@bar.bar set topic: abc def ghi # process non-self channel JOIN -0:2 < :baz!~baz@baz.baz JOIN :#test -1,2 $ users:2:nick set to: [?] -1,2 $ users:2:nick set to: [baz] -1,2 $ users:2:user set to: [~baz] -1,2 $ users:2:host set to: [baz.baz] -1,2 $ channels:#test:user_ids set to: -1,2 $ 1 -1,2 $ 2 -1,2 $ me -5 $ baz!~baz@baz.baz joins +0:1 < :baz!~baz@baz.baz JOIN :#test +1 $ users:2:nick set to: [?] +1 $ users:2:nick set to: [baz] +1 $ users:2:user set to: [~baz] +1 $ users:2:host set to: [baz.baz] +1 $ channels:#test:user_ids set to: +1 $ 1 +1 $ 2 +1 $ me +4 $ baz!~baz@baz.baz joins # join second channel with partial residents identity to compare distribution of resident-specific messages > /join #testtest -2 > JOIN :#testtest -0:2 < :foo1!~foobarbaz@baz.bar.foo JOIN #testtest -0:2 < :foo.bar.baz 353 foo1 @ #testtest :foo1 baz -1,2 $ channels:#testtest:exits cleared -0:2 < :foo.bar.baz 366 foo1 #testtest :End of /NAMES list. -1,2 $ channels:#testtest:user_ids set to: -1,2 $ 2 -1,2 $ me -6 $ residents: baz, foo1 +1 > JOIN :#testtest +0:1 < :foo1!~foobarbaz@baz.bar.foo JOIN #testtest +0:1 < :foo.bar.baz 353 foo1 @ #testtest :foo1 baz +1 $ channels:#testtest:exits cleared +0:1 < :foo.bar.baz 366 foo1 #testtest :End of /NAMES list. +1 $ channels:#testtest:user_ids set to: +1 $ 2 +1 $ me +5 $ residents: baz, foo1 # handle query window with known user -0:2 < :baz!~baz@baz.baz PRIVMSG foo1 :hi there -7 < [baz] hi there +0:1 < :baz!~baz@baz.baz PRIVMSG foo1 :hi there +6 < [baz] hi there > /privmsg baz hello, how is it going -2 > PRIVMSG baz :hello, how is it going -7 > [foo1] hello, how is it going -0:2 < :baz!~baz@baz.baz PRIVMSG foo1 :fine! -7 < [baz] fine! +1 > PRIVMSG baz :hello, how is it going +6 > [foo1] hello, how is it going +0:1 < :baz!~baz@baz.baz PRIVMSG foo1 :fine! +6 < [baz] fine! # handle failure to query absent user > /privmsg barbar hello! -2 > PRIVMSG barbar :hello! -8 > [foo1] hello! -0:2 < :*.?.net 401 foo1 barbar :No such nick/channel -8 !$ barbar not online +1 > PRIVMSG barbar :hello! +7 > [foo1] hello! +0:1 < :*.?.net 401 foo1 barbar :No such nick/channel +7 !$ barbar not online # handle non-self renaming -0:2 < :baz!~baz@baz.baz NICK :bazbaz -1,2 $ users:2:nick set to: [bazbaz] -5,6,7 $ baz!~baz@baz.baz renames bazbaz +0:1 < :baz!~baz@baz.baz NICK :bazbaz +1 $ users:2:nick set to: [bazbaz] +4,5,6 $ baz!~baz@baz.baz renames bazbaz # handle non-self PART in one of two inhabited channels, preserve identity into re-JOIN -0:2 < :bazbaz!~baz@baz.baz PART :#test -1,2 $ channels:#test:exits:2 set to: [P] -1,2 $ channels:#test:user_ids set to: -1,2 $ 1 -1,2 $ me -5 $ bazbaz!~baz@baz.baz parts -1,2 $ channels:#test:exits:2 cleared -0:2 < :bazbaz!~baz@baz.baz JOIN :#test -1,2 $ channels:#test:user_ids set to: -1,2 $ 1 -1,2 $ 2 -1,2 $ me -5 $ bazbaz!~baz@baz.baz joins +0:1 < :bazbaz!~baz@baz.baz PART :#test +1 $ channels:#test:exits:2 set to: [P] +1 $ channels:#test:user_ids set to: +1 $ 1 +1 $ me +4 $ bazbaz!~baz@baz.baz parts +1 $ channels:#test:exits:2 cleared +0:1 < :bazbaz!~baz@baz.baz JOIN :#test +1 $ channels:#test:user_ids set to: +1 $ 1 +1 $ 2 +1 $ me +4 $ bazbaz!~baz@baz.baz joins # handle non-self PART in only inhabited channel, lose identity, re-join as new identity -0:2 < :bar!~bar@bar.bar PART :#test -1,2 $ channels:#test:exits:1 set to: [P] -1,2 $ channels:#test:user_ids set to: -1,2 $ 2 -1,2 $ me -5 $ bar!~bar@bar.bar parts -1,2 $ channels:#test:exits:1 cleared -1,2 $ users:1 cleared -0:2 < :bar!~bar@bar.bar JOIN :#test -1,2 $ users:3:nick set to: [?] -1,2 $ users:3:nick set to: [bar] -1,2 $ users:3:user set to: [~bar] -1,2 $ users:3:host set to: [bar.bar] -1,2 $ channels:#test:user_ids set to: -1,2 $ 2 -1,2 $ 3 -1,2 $ me -5 $ bar!~bar@bar.bar joins +0:1 < :bar!~bar@bar.bar PART :#test +1 $ channels:#test:exits:1 set to: [P] +1 $ channels:#test:user_ids set to: +1 $ 2 +1 $ me +4 $ bar!~bar@bar.bar parts +1 $ channels:#test:exits:1 cleared +1 $ users:1 cleared +0:1 < :bar!~bar@bar.bar JOIN :#test +1 $ users:3:nick set to: [?] +1 $ users:3:nick set to: [bar] +1 $ users:3:user set to: [~bar] +1 $ users:3:host set to: [bar.bar] +1 $ channels:#test:user_ids set to: +1 $ 2 +1 $ 3 +1 $ me +4 $ bar!~bar@bar.bar joins # handle non-self QUIT -0:2 < :bazbaz!~baz@baz.baz QUIT :Client Quit -1,2 $ users:2:exit_msg set to: [QClient Quit] -7 $ bazbaz!~baz@baz.baz quits: Client Quit -1,2 $ channels:#test:exits:2 set to: [QClient Quit] -1,2 $ channels:#test:user_ids set to: -1,2 $ 3 -1,2 $ me -5 $ bazbaz!~baz@baz.baz quits: Client Quit -1,2 $ channels:#test:exits:2 cleared -1,2 $ channels:#testtest:exits:2 set to: [QClient Quit] -1,2 $ channels:#testtest:user_ids set to: -1,2 $ me +0:1 < :bazbaz!~baz@baz.baz QUIT :Client Quit +1 $ users:2:exit_msg set to: [QClient Quit] 6 $ bazbaz!~baz@baz.baz quits: Client Quit -1,2 $ channels:#testtest:exits:2 cleared -1,2 $ users:2 cleared +1 $ channels:#test:exits:2 set to: [QClient Quit] +1 $ channels:#test:user_ids set to: +1 $ 3 +1 $ me +4 $ bazbaz!~baz@baz.baz quits: Client Quit +1 $ channels:#test:exits:2 cleared +1 $ channels:#testtest:exits:2 set to: [QClient Quit] +1 $ channels:#testtest:user_ids set to: +1 $ me +5 $ bazbaz!~baz@baz.baz quits: Client Quit +1 $ channels:#testtest:exits:2 cleared +1 $ users:2 cleared # handle self-PART: clear channel, and its squatters -0:2 < :foo1!~foobarbaz@baz.bar.foo PART :#test -1,2 $ channels:#test:exits:me set to: [P] -1,2 $ channels:#test:user_ids set to: -1,2 $ 3 -5 $ foo1!~foobarbaz@baz.bar.foo parts -1,2 $ channels:#test:exits:me cleared -1,2 $ channels:#test cleared -1,2 $ users:3 cleared +0:1 < :foo1!~foobarbaz@baz.bar.foo PART :#test +1 $ channels:#test:exits:me set to: [P] +1 $ channels:#test:user_ids set to: +1 $ 3 +4 $ foo1!~foobarbaz@baz.bar.foo parts +1 $ channels:#test:exits:me cleared +1 $ channels:#test cleared +1 $ users:3 cleared # fail to reconnect while connected > /reconnect @@ -347,33 +346,33 @@ # handle /disconnect, clear all > /disconnect -2 > QUIT :ircplom says bye -0:2 < :foo1!~foobarbaz@baz.bar.foo QUIT :Client Quit -1,2 $ users:me:exit_msg set to: [QClient Quit] -3,4,7,8 $ foo1!~foobarbaz@baz.bar.foo quits: Client Quit -1,2 $ channels:#testtest:exits:me set to: [QClient Quit] -1,2 $ channels:#testtest:user_ids set to: -6 $ foo1!~foobarbaz@baz.bar.foo quits: Client Quit -1,2 $ channels:#testtest:exits:me cleared -0: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: [] -3,4,5,6,7,8 $ DISCONNECTED -1,2 $ isupport cleared -1,2 $ isupport:CHANTYPES set to: [#&] -1,2 $ isupport:PREFIX set to: [(ov)@+] -1,2 $ isupport:USERLEN set to: [10] -1,2 $ motd set to: -1,2 $ sasl_account set to: [] -1,2 $ sasl_auth_state set to: [] -1,2 $ caps cleared -1,2 $ channels cleared -1,2 $ users cleared +1 > QUIT :ircplom says bye +0:1 < :foo1!~foobarbaz@baz.bar.foo QUIT :Client Quit +1 $ users:me:exit_msg set to: [QClient Quit] +2,3,6,7 $ foo1!~foobarbaz@baz.bar.foo quits: Client Quit +1 $ channels:#testtest:exits:me set to: [QClient Quit] +1 $ channels:#testtest:user_ids set to: +5 $ foo1!~foobarbaz@baz.bar.foo quits: Client Quit +1 $ channels:#testtest:exits:me cleared +0:1 < ERROR :Closing link: (~foobarbaz@baz.bar.foo) [Quit: ircplom says bye] +1 $ connection_state set to: [Closing link: (~foobarbaz@baz.bar.foo) [Quit: ircplom says bye]] +1 $ connection_state set to: [] +2,3,4,5,6,7 $ DISCONNECTED +1 $ isupport cleared +1 $ isupport:CHANTYPES set to: [#&] +1 $ isupport:PREFIX set to: [(ov)@+] +1 $ isupport:USERLEN set to: [10] +1 $ motd set to: +1 $ sasl_account set to: [] +1 $ sasl_auth_state set to: [] +1 $ caps cleared +1 $ channels cleared +1 $ users cleared # fail to send in disconnect, check alert window is command prompt window -> /window 7 +> /window 6 > /privmsg barbar test -7 !$ cannot send, connection seems closed +6 !$ cannot send, connection seems closed > /window 1 > /privmsg barbar test 1 !$ cannot send, connection seems closed @@ -382,64 +381,64 @@ # test setting up second client, but 432 irrecoverably > /connect baz.bar.foo ?foo foo:foo -9,10 $ isupport cleared -9,10 $ isupport:CHANTYPES set to: [#&] -9,10 $ isupport:PREFIX set to: [(ov)@+] -9,10 $ isupport:USERLEN set to: [10] -9,10 $ hostname set to: [baz.bar.foo] -9,10 $ port set to: [-1] -9,10 $ nick_wanted set to: [?foo] -9,10 $ user_wanted set to: [foo] -9,10 $ realname set to: [foo] -9,10 $ port set to: [6697] -9,10 $ connection_state set to: [connecting] -9,10 $ connection_state set to: [connected] +8 $ isupport cleared +8 $ isupport:CHANTYPES set to: [#&] +8 $ isupport:PREFIX set to: [(ov)@+] +8 $ isupport:USERLEN set to: [10] +8 $ hostname set to: [baz.bar.foo] +8 $ port set to: [-1] +8 $ nick_wanted set to: [?foo] +8 $ user_wanted set to: [foo] +8 $ realname set to: [foo] +8 $ port set to: [6697] +8 $ connection_state set to: [connecting] +8 $ connection_state set to: [connected] , $ CONNECTED -1:10 > CAP LS :302 -1:10 > USER foo 0 * :foo -1:10 > NICK :?foo -1:10 < :*.?.net 432 * ?foo :Erroneous nickname -9,10 $ connection_state set to: [] +1:8 > CAP LS :302 +1:8 > USER foo 0 * :foo +1:8 > NICK :?foo +1:8 < :*.?.net 432 * ?foo :Erroneous nickname +8 $ connection_state set to: [] , $ DISCONNECTED -9,10 $ isupport cleared -9,10 $ isupport:CHANTYPES set to: [#&] -9,10 $ isupport:PREFIX set to: [(ov)@+] -9,10 $ isupport:USERLEN set to: [10] -9,10 !$ nickname refused for bad format, giving up +8 $ isupport cleared +8 $ isupport:CHANTYPES set to: [#&] +8 $ isupport:PREFIX set to: [(ov)@+] +8 $ isupport:USERLEN set to: [10] +8 !$ nickname refused for bad format, giving up # test failing third connection > /connect baz.baz.baz baz baz:baz -11,12 $ isupport cleared -11,12 $ isupport:CHANTYPES set to: [#&] -11,12 $ isupport:PREFIX set to: [(ov)@+] -11,12 $ isupport:USERLEN set to: [10] -11,12 $ hostname set to: [baz.baz.baz] -11,12 $ port set to: [-1] -11,12 $ nick_wanted set to: [baz] -11,12 $ user_wanted set to: [baz] -11,12 $ realname set to: [baz] -11,12 $ port set to: [6697] -11,12 $ connection_state set to: [connecting] -11,12 $ connection_state set to: [connected] +9 $ isupport cleared +9 $ isupport:CHANTYPES set to: [#&] +9 $ isupport:PREFIX set to: [(ov)@+] +9 $ isupport:USERLEN set to: [10] +9 $ hostname set to: [baz.baz.baz] +9 $ port set to: [-1] +9 $ nick_wanted set to: [baz] +9 $ user_wanted set to: [baz] +9 $ realname set to: [baz] +9 $ port set to: [6697] +9 $ connection_state set to: [connecting] +9 $ connection_state set to: [connected] , $ CONNECTED -2:12 > CAP LS :302 -2:12 > USER baz 0 * :baz -2:12 > NICK :baz +2:9 > CAP LS :302 +2:9 > USER baz 0 * :baz +2:9 > NICK :baz 2: < FAKE_IRC_CONN_ABORT_EXCEPTION -11,12 $ connection_state set to: [broken: FAKE_IRC_CONN_ABORT_EXCEPTION] -11,12 $ connection_state set to: [] +9 $ connection_state set to: [broken: FAKE_IRC_CONN_ABORT_EXCEPTION] +9 $ connection_state set to: [] , $ DISCONNECTED -11,12 $ isupport cleared -11,12 $ isupport:CHANTYPES set to: [#&] -11,12 $ isupport:PREFIX set to: [(ov)@+] -11,12 $ isupport:USERLEN set to: [10] +9 $ isupport cleared +9 $ isupport:CHANTYPES set to: [#&] +9 $ isupport:PREFIX set to: [(ov)@+] +9 $ isupport:USERLEN set to: [10] # 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 -3,4,5,6,7,8 $ CONNECTED +2,3,4,5,6,7 $ CONNECTED repeat 66:158 -repeat 169:383 +repeat 168:382 > /quit 0 < -- 2.30.2