From 05a0b1f9bb03c9924ea01c26c91730b8e91f89c0 Mon Sep 17 00:00:00 2001 From: luk3yx Date: Thu, 21 Apr 2022 12:57:42 +1200 Subject: Fix 001 format --- miniirc_idc.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/miniirc_idc.py b/miniirc_idc.py index 45d7757..7353f60 100644 --- a/miniirc_idc.py +++ b/miniirc_idc.py @@ -23,14 +23,16 @@ class IDC(miniirc.IRC): args = _esc_re.sub(lambda m: m.group(1) or '\udeff', msg).split('\udeff') command = args.pop(0).upper() + hostmask = ('', '', '') tags = {} if command == 'PRIVMSG': dt = datetime.datetime.utcfromtimestamp(float(args[0])) tags['time'] = dt.isoformat() + 'Z' hostmask = (args[1], args[1], f'idc/{args[1]}') args = [self.current_nick, args[2]] - else: - hostmask = ('', '', '') + elif command == 'RPL_LOGIN_GOOD': + command = '001' + args = [self.current_nick, f'Welcome to IDC {self.current_nick}'] if args and _LEADING_COLON: args[-1] = _LEADING_COLON + args[-1] -- cgit v1.2.3