From e14289eb39410a9e339c556db3eb70a70e414454 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Sat, 19 Dec 2020 03:40:11 +0000 Subject: [PATCH] Remove channel name from WHOX and TOPIC (cf. 1dd47c4f) --- irclog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/irclog.py b/irclog.py index d745035..43d84ac 100644 --- a/irclog.py +++ b/irclog.py @@ -608,7 +608,7 @@ class IRCClientProtocol(asyncio.Protocol): yield 'TOPIC', channel, f'{get_mode_nick(channel)} sets the topic to: {line.params[1]}' elif line.command == ircstates.numerics.RPL_TOPIC: channel = line.params[1] - yield 'TOPIC', channel, f'Topic of {channel}: {line.params[2]}' + yield 'TOPIC', channel, f'Topic: {line.params[2]}' elif line.command == ircstates.numerics.RPL_TOPICWHOTIME: date = datetime.datetime.utcfromtimestamp(int(line.params[3])).replace(tzinfo = datetime.timezone.utc) yield 'TOPICWHO', line.params[1], f'Topic set by {irctokens.hostmask(line.params[2]).nickname} at {date:%Y-%m-%d %H:%M:%SZ}' @@ -622,7 +622,7 @@ class IRCClientProtocol(asyncio.Protocol): for nickname, account in self.whoxReply: accountStr = f' ({account})' if account is not None else '' users.append(f'{self.render_nick_with_mode(self.server.channels[self.server.casefold(self.whoxChannel)].users.get(self.server.casefold(nickname)), nickname)}{accountStr}') - return f'Currently in {self.whoxChannel}: {", ".join(users)}' + return f'Current users: {", ".join(users)}' async def quit(self): # The server acknowledges a QUIT by sending an ERROR and closing the connection. The latter triggers connection_lost, so just wait for the closure event.