class _ClientWindow(Window, ClientQueueMixin):
- def __init__(self, scope: _LogScope, log: Callable, **kwargs) -> None:
+ def __init__(self, scope: _LogScope, **kwargs) -> None:
self.scope = scope
- self._log = log
super().__init__(**kwargs)
self._title = f'{self.client_id} '\
+ f':{"DEBUG" if self.scope == _LogScope.DEBUG else "RAW"}'
def cmd__disconnect(self, quit_msg: str = 'ircplom says bye') -> None:
'Send QUIT command to server.'
- self._log('requesting disconnect …', scope=_LogScope.DEBUG)
self._send_msg('QUIT', (quit_msg,))
def cmd__reconnect(self) -> None:
self._new_win(_LogScope.DEBUG)
def _new_win(self, scope: _LogScope, chatname: str = '') -> _ClientWindow:
- kwargs = {'scope': scope, 'log': self.log, 'win_cls': _ClientWindow}
+ kwargs = {'scope': scope, 'win_cls': _ClientWindow}
if scope == _LogScope.CHAT:
kwargs['win_cls'] = (
_ChannelWindow if self.db.is_chan_name(chatname)
# handle /disconnect, clear all
> /disconnect
-1,2 $ requesting 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]