class _ClientWindow(Window, ClientQueueMixin):
+ _title_separator = ':'
+ _logpath_prefix = '!'
def __init__(self, path_logs: Optional[Path], **kwargs) -> None:
self._path_logs = path_logs
super().__init__(**kwargs)
- self._title = ':DEBUG'
+ self._title = 'DEBUG'
@property
def title(self) -> str:
- return f'{self.client_id} {self._title}'
+ return f'{self.client_id}{self._title_separator}{self._title}'
def log(self, msg: str) -> None:
super().log(msg)
ret += '_'
return ret
client_path = _PATH_LOGS.joinpath(escaped(self.client_id))
- chat_path = client_path.joinpath(escaped(self._title))
+ chat_path = client_path.joinpath(self._logpath_prefix
+ + escaped(self._title))
if not chat_path.exists():
chat_path.mkdir(parents=True)
with chat_path.joinpath(f'{self._last_today}.txt'
class _ChatWindow(_ClientWindow):
prompt: _ChatPrompt
+ _title_separator = '/'
+ _logpath_prefix = ''
def __init__(self, chatname: str, get_nick_data: Callable, **kwargs
) -> None:
self._get_nick_data = get_nick_data
+ self.chatname = chatname
super().__init__(**kwargs)
self._title = chatname
self.set_prompt_prefix()
- @property
- def chatname(self) -> str:
- 'Name of channel or user with whom we chat.'
- return self._title
-
def set_prompt_prefix(self) -> None:
'Look up relevant DB data to update prompt prefix.'
self.prompt.set_prefix_data(self._get_nick_data())
> /list
0 ..# windows available via /window:
0 ..# 0) :start
-0 ..# 1) foo.bar.baz :DEBUG
-0 ..# 2) foo.bar.baz server
-0 ..# 3) foo.bar.baz SaslServ
+0 ..# 1) foo.bar.baz:DEBUG
+0 ..# 2) foo.bar.baz/ server
+0 ..# 3) foo.bar.baz/SaslServ
| conn5
> /window 1
> /help