class _ClientWindow(Window, ClientQueueMixin):
- def __init__(self, stream: str, **kwargs) -> None:
+ def __init__(self, stream: str, log: Callable, **kwargs) -> None:
self.stream = stream
+ self._log = log
super().__init__(**kwargs)
@property
def cmd__disconnect(self, quit_msg: str = 'ircplom says bye') -> None:
'Send QUIT command to server.'
+ self._log('requesting disconnect …', stream=STREAM_SERVER)
self._send_msg('QUIT', (quit_msg,))
def cmd__reconnect(self) -> None:
def _new_window(self, stream: str) -> _ClientWindow:
win_class = (_PrivmsgWindow if stream[0:1] != STREAM_PREFIX_META
else _ClientWindow)
- win = self._tui_new_window(win_class, stream=stream)
+ win = self._tui_new_window(win_class, stream=stream, log=self.log)
if isinstance(win, _PrivmsgWindow):
self._prompt_update(win)
self.windows += [win]