home · contact · privacy
Rename confusing STREAM_GLOB to STREAM_ALL.
authorChristian Heller <c.heller@plomlompom.de>
Sun, 10 Aug 2025 09:52:14 +0000 (11:52 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Sun, 10 Aug 2025 09:52:14 +0000 (11:52 +0200)
ircplom/client.py
ircplom/client_tui.py

index dff7db42936ccb4986df2e0c1432835d4a717222..1b7ebf991fd82f25c4eff82964ba6f5b916ca854 100644 (file)
@@ -12,7 +12,7 @@ from ircplom.irc_conn import (BaseIrcConnection, IrcConnAbortException,
                               IrcMessage, PORT_SSL)
 
 ClientsDb = dict[str, 'Client']
-STREAM_GLOB = '*'
+STREAM_ALL = '*'
 STREAM_PREFIX_META = ':'
 STREAM_SERVER = f'{STREAM_PREFIX_META}server'
 STREAM_RAW = f'{STREAM_PREFIX_META}raw'
@@ -216,7 +216,7 @@ class Client(ABC, ClientQueueMixin):
         assert self.conn is not None
         self._log.add('connected to server (SSL: '
                       f'{"yes" if self.conn.ssl else "no"})',
-                      stream=STREAM_GLOB)
+                      stream=STREAM_ALL)
         self._caps.challenge('LS', '302')
         self.send(IrcMessage(verb='USER',
                              params=(getuser(), '0', '*',
@@ -254,7 +254,7 @@ class Client(ABC, ClientQueueMixin):
                     else f'changed from "{self.conn_setup.nickname}"')
             self.conn_setup.nickname = nickname
             self._log.add(f'{prefix} {verb} to "{nickname}"',
-                          stream=STREAM_GLOB)
+                          stream=STREAM_ALL)
         if first_run or nick_confirmed != self.nick_confirmed:
             self.nick_confirmed = nick_confirmed
             if not first_run:
@@ -263,7 +263,7 @@ class Client(ABC, ClientQueueMixin):
 
     def close(self) -> None:
         'Close both recv Loop and socket.'
-        self._log.add(msg='disconnecting from server', stream=STREAM_GLOB)
+        self._log.add(msg='disconnecting from server', stream=STREAM_ALL)
         self._caps.clear()
         if self.conn:
             self.conn.close()
index 9400570aa1f91c9b8a3d83e3eaff9f1add1c7ec9..35b840327c0a5c4b6b0a78c53baa433c75345ae9 100644 (file)
@@ -8,7 +8,7 @@ from ircplom.tui_base import (BaseTui, PromptWidget, TuiEvent, Window,
                               CMD_SHORTCUTS)
 from ircplom.irc_conn import IrcMessage
 from ircplom.client import (
-        STREAM_GLOB, STREAM_PREFIX_META, STREAM_RAW, STREAM_SERVER,
+        STREAM_ALL, STREAM_PREFIX_META, STREAM_RAW, STREAM_SERVER,
         IrcConnSetup, Client, ClientQueueMixin, NewClientEvent)
 
 CMD_SHORTCUTS['disconnect'] = 'window.disconnect'
@@ -115,7 +115,7 @@ class _ClientWindowsManager:
 
     def log(self, msg: str, stream: str) -> None:
         'Log msg to stram.'
-        if stream == STREAM_GLOB:
+        if stream == STREAM_ALL:
             for win in self.windows:
                 win.history.append(msg)
         else: