update.results += [(_LogScope.ALL, [':DISCONNECTED'])]
elif update.key == 'message' and update.value:
assert isinstance(update.value, ChatMessage)
- who = (f':{update.value.sender}' if update.value.sender
- else 'NICK:me')
- update.results += [(_LogScope.CHAT,
- [':[', who, f':] {update.value.content}'])]
+ toks = [':*** '] if update.value.is_notice else []
+ toks += [':[']
+ toks += [f':{update.value.sender}' if update.value.sender
+ else 'NICK:me']
+ toks += [f':] {update.value.content}']
+ update.results += [(_LogScope.CHAT, toks)]
class _ClientWindowsManager:
prefix = '$'
if 'out' in kwargs:
prefix = _LOG_PREFIX_OUT if kwargs['out'] else _LOG_PREFIX_IN
- if kwargs.get('is_notice', False):
- prefix *= 3
kw = {k: v for k, v in kwargs.items() if k in {'log_target', 'alert'}}
self._tui_log(msg, scope=scope, prefix=prefix, **kw)
log_kwargs['log_target'] = (update.value.target
or update.value.sender)
log_kwargs['out'] = not bool(update.value.sender)
- log_kwargs['is_notice'] = update.value.is_notice
elif scope in {_LogScope.CHAT, _LogScope.USER,
_LogScope.USER_NO_CHANNELS}:
log_kwargs['log_target'] = update.full_path[1]
# expect some NOTICE and PING to process/reply during initiation
0:1 < :*.?.net NOTICE * :*** Looking up your ident...
-2 <<< [ server] *** Looking up your ident...
+2 < *** [ server] *** Looking up your ident...
0:1 < :*.?.net NOTICE * :*** Looking up your hostname...
-2 <<< [ server] *** Looking up your hostname...
+2 < *** [ server] *** Looking up your hostname...
0:1 < :*.?.net NOTICE * :*** Found your hostname (baz.bar.foo)
-2 <<< [ server] *** Found your hostname (baz.bar.foo)
+2 < *** [ server] *** Found your hostname (baz.bar.foo)
0:1 < PING :?
1 > PONG :?
# handle bot query NOTICE
0:1 < :SaslServ!SaslServ@services.bar.baz NOTICE foo1 :Last login from ~foobarbaz@foo.bar.baz on Jan 1 22:00:00 2021 +0000.
-3 <<< [SaslServ] Last login from ~foobarbaz@foo.bar.baz on Jan 1 22:00:00 2021 +0000.
+3 < *** [SaslServ] Last login from ~foobarbaz@foo.bar.baz on Jan 1 22:00:00 2021 +0000.
# check difference in available commands when switching to client window
> /join #test