summaryrefslogtreecommitdiff
path: root/miniirc_idc.py
diff options
context:
space:
mode:
authorluk3yx <luk3yx@users.noreply.github.com>2022-04-24 15:27:10 +1200
committerluk3yx <luk3yx@users.noreply.github.com>2022-04-24 15:27:10 +1200
commitd31399973716a4ccad890c37ea2a27a746ef01ff (patch)
treee074d3d86879b2b807a04d42b1ed8999e2a1fd24 /miniirc_idc.py
parentf30883e7e80f642262d092d2a638d758b96c876b (diff)
downloadminiirc_idc-d31399973716a4ccad890c37ea2a27a746ef01ff.tar.gz
miniirc_idc-d31399973716a4ccad890c37ea2a27a746ef01ff.zip
Make Andrew happy
Diffstat (limited to 'miniirc_idc.py')
-rw-r--r--miniirc_idc.py31
1 files changed, 26 insertions, 5 deletions
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',
}