From d31399973716a4ccad890c37ea2a27a746ef01ff Mon Sep 17 00:00:00 2001 From: luk3yx Date: Sun, 24 Apr 2022 15:27:10 +1200 Subject: Make Andrew happy --- miniirc_idc.py | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'miniirc_idc.py') diff --git a/miniirc_idc.py b/miniirc_idc.py index 3a7303f..a4b2781 100644 --- a/miniirc_idc.py +++ b/miniirc_idc.py @@ -3,6 +3,26 @@ # This is very horrible and quickly written # But it works # +# Copyright © 2022 by luk3yx +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# from __future__ import annotations from collections.abc import Iterator, Sequence @@ -79,8 +99,8 @@ class IDC(miniirc.IRC): dt = datetime.datetime.utcfromtimestamp(float(idc_args['TS'])) tags['time'] = dt.isoformat() + 'Z' - if 'ID' in idc_args: - tags['label'] = idc_args['ID'] + if 'LABEL' in idc_args: + tags['label'] = idc_args['LABEL'] if args and _LEADING_COLON: args[-1] = _LEADING_COLON + args[-1] @@ -129,12 +149,13 @@ class IDC(miniirc.IRC): msg_type = None self.idc_send('CHANMSG' if target.startswith('#') else 'PRIVMSG', - target=target, type=msg_type, message=msg, id=label) + target=target, type=msg_type, message=msg, + label=label) elif cmd == 'PING': - self.idc_send('PING', cookie=args[0], id=label) + self.idc_send('PING', cookie=args[0], label=label) elif cmd == 'USER': user, password = self._get_idc_account() - self.idc_send('USER', user=user, password=password, id=label) + self.idc_send('USER', user=user, password=password, label=label) self.active_caps = self.ircv3_caps & { 'account-tag', 'labeled-response', # 'message-tags', } -- cgit v1.2.3