diff options
author | luk3yx <luk3yx@users.noreply.github.com> | 2022-04-21 12:57:42 +1200 |
---|---|---|
committer | luk3yx <luk3yx@users.noreply.github.com> | 2022-04-21 12:57:42 +1200 |
commit | 05a0b1f9bb03c9924ea01c26c91730b8e91f89c0 (patch) | |
tree | e3edc5063816db441e42109625a35a17af1b6561 | |
parent | 5efb17b2abdc8b7477e6ece15b891fee88f7dd8e (diff) | |
download | miniirc_idc-05a0b1f9bb03c9924ea01c26c91730b8e91f89c0.tar.gz miniirc_idc-05a0b1f9bb03c9924ea01c26c91730b8e91f89c0.zip |
Fix 001 format
-rw-r--r-- | miniirc_idc.py | 6 |
1 files 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] |