diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2019-08-24 07:19:01 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2019-08-24 07:19:01 +0200 |
commit | bad8db720e0b349fdf8e94dd89f6328a800cedd5 (patch) | |
tree | 266dede85a381842d9699a9e0ec788056de1a9ea | |
parent | 61c5d08320805d65a259fe6f9574597e8694161b (diff) | |
download | weechat-bad8db720e0b349fdf8e94dd89f6328a800cedd5.zip |
irc: fix parsing of message 346, 348 and 728 when there is a colon before the timestamp (issue #1396)
IRC Messages:
- 346: invite list
- 348: exception list
- 728: quiet list
-rw-r--r-- | ChangeLog.adoc | 2 | ||||
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 927d56429..45ff70188 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -41,7 +41,7 @@ Bug fixes:: * core: replace char "," by "~" in color codes to separate foreground from background (issue #1264) * alias: remove default aliases /AME and /AMSG (issue #1355) * buflist: use extra variables in option buflist.look.display_conditions (issue #1393) - * irc: fix parsing of message 367 (banlist) when there is a colon before the timestamp (issue #1396) + * irc: fix parsing of messages 346 (invite list), 348 (exception list), 367 (ban list) and 728 (quiet list) when there is a colon before the timestamp (issue #1396) * irc: fix memory leak when removing a server * irc: fix length of user/nick/host in split of messages (issue #1387) * irc: quote NICK command argument sent to the server only if there's a ":" in the nick (issue #1376, issue #1319) diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 30b57f781..9b483930d 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -4318,7 +4318,7 @@ IRC_PROTOCOL_CALLBACK(346) irc_message_get_address_from_host (argv[5])); if (argc >= 7) { - datetime = (time_t)(atol (argv[6])); + datetime = (time_t)(atol ((argv[6][0] == ':') ? argv[6] + 1 : argv[6])); if (ptr_modelist) irc_modelist_item_new (ptr_modelist, argv[4], argv[5], datetime); weechat_printf_date_tags ( @@ -4489,7 +4489,7 @@ IRC_PROTOCOL_CALLBACK(348) irc_message_get_address_from_host (argv[5])); if (argc >= 7) { - datetime = (time_t)(atol (argv[6])); + datetime = (time_t)(atol ((argv[6][0] == ':') ? argv[6] + 1 : argv[6])); if (ptr_modelist) irc_modelist_item_new (ptr_modelist, argv[4], argv[5], datetime); weechat_printf_date_tags ( @@ -5816,7 +5816,7 @@ IRC_PROTOCOL_CALLBACK(728) irc_message_get_address_from_host (argv[6])); if (argc >= 8) { - datetime = (time_t)(atol (argv[7])); + datetime = (time_t)(atol ((argv[7][0] == ':') ? argv[7] + 1 : argv[7])); if (ptr_modelist) irc_modelist_item_new (ptr_modelist, argv[5], argv[6], datetime); weechat_printf_date_tags ( |