From: Christian Heller Date: Wed, 3 Sep 2025 11:37:52 +0000 (+0200) Subject: Handle parts with messages. X-Git-Url: https://plomlompom.com/repos/balance?a=commitdiff_plain;h=056ef9730ab5b417ab6937a2bf6783d2654608ee;p=ircplom Handle parts with messages. --- diff --git a/ircplom/client.py b/ircplom/client.py index b1fd4b8..fbdbb83 100644 --- a/ircplom/client.py +++ b/ircplom/client.py @@ -830,6 +830,8 @@ class Client(ABC, ClientQueueMixin): self._log(ret['message'], out=False, **kw) elif ret['verb'] == 'PART': self._db.channels[ret['channel']].remove_nick(ret['parter']) + self._log(f'{ret["parter"]} parts: {ret["message"]}', + LogScope.CHAT, target=ret['channel']) if ret['parter'] == self._db.users['me']: del self._db.channels[ret['channel']] elif ret['verb'] == 'PING': diff --git a/ircplom/msg_parse_expectations.py b/ircplom/msg_parse_expectations.py index 2399169..750c0ae 100644 --- a/ircplom/msg_parse_expectations.py +++ b/ircplom/msg_parse_expectations.py @@ -287,6 +287,10 @@ MSG_EXPECTATIONS += [ _MsgParseExpectation((MsgTok.NICK_USER_HOST, ':parter'), 'PART', ((MsgTok.CHANNEL, ':channel'),)), + _MsgParseExpectation((MsgTok.NICK_USER_HOST, ':parter'), + 'PART', + ((MsgTok.CHANNEL, ':channel'), + (MsgTok.ANY, ':message'))), _MsgParseExpectation((MsgTok.NICK_USER_HOST, ':author'), 'TOPIC', ((MsgTok.CHANNEL, ':channel'),