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'
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', '*',
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:
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()
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'
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: