diff options
-rw-r--r-- | ChangeLog.adoc | 1 | ||||
-rw-r--r-- | src/plugins/irc/irc-command.c | 6 | ||||
-rw-r--r-- | src/plugins/irc/irc-input.c | 12 | ||||
-rw-r--r-- | src/plugins/irc/irc-input.h | 3 | ||||
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 6 |
5 files changed, 21 insertions, 7 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 6beb32cc7..d310bb201 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -46,6 +46,7 @@ Bug fixes:: * irc: add channel in "autojoin" server option only when the channel is actually joined (issue #1990) * irc: add missing tags on multiline messages (issue #1987) * irc: fix redirection of command `/list` when the reply doesn't start with message 321 (start of /list) + * irc: fix wrong time displayed for CTCP messages received from self nick (issue #2000) * relay: synchronize nick modes with IRC client upon connection (issue #1984) * script: fix cursor position after `/script list -i` or `/script list -il` * script: fix buffer used by command `/script list -i|-il|-o|-ol` diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index e6d12ad77..1b0785ab4 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -386,6 +386,7 @@ irc_command_me_channel_message (struct t_irc_server *server, { irc_input_user_message_display ( server, + 0, /* date */ channel_name, NULL, /* address */ "privmsg", @@ -1971,6 +1972,7 @@ IRC_COMMAND_CALLBACK(ctcp) { irc_input_user_message_display ( ptr_server, + 0, /* date */ ctcp_target, NULL, /* address */ "privmsg", @@ -3846,6 +3848,7 @@ IRC_COMMAND_CALLBACK(msg) { irc_input_user_message_display ( ptr_server, + 0, /* date */ ptr_channel->name, NULL, /* address */ "privmsg", @@ -3866,6 +3869,7 @@ IRC_COMMAND_CALLBACK(msg) { irc_input_user_message_display ( ptr_server, + 0, /* date */ targets[i], NULL, /* address */ "privmsg", @@ -4021,6 +4025,7 @@ IRC_COMMAND_CALLBACK(notice) ptr_message = (const char *)weechat_arraylist_get (list_messages, i); irc_input_user_message_display ( ptr_server, + 0, /* date */ argv[arg_target], NULL, /* address */ "notice", @@ -4550,6 +4555,7 @@ IRC_COMMAND_CALLBACK(query) { irc_input_user_message_display ( ptr_server, + 0, /* date */ ptr_channel->name, NULL, /* address */ "privmsg", diff --git a/src/plugins/irc/irc-input.c b/src/plugins/irc/irc-input.c index fa44d5938..75e2bbf0d 100644 --- a/src/plugins/irc/irc-input.c +++ b/src/plugins/irc/irc-input.c @@ -63,6 +63,7 @@ void irc_input_user_message_display (struct t_irc_server *server, + time_t date, const char *target, const char *address, const char *command, @@ -163,7 +164,7 @@ irc_input_user_message_display (struct t_irc_server *server, { weechat_printf_date_tags ( ptr_buffer, - 0, + date, irc_protocol_tags ( server, command, @@ -190,7 +191,7 @@ irc_input_user_message_display (struct t_irc_server *server, { weechat_printf_date_tags ( ptr_buffer, - 0, + date, irc_protocol_tags ( server, command, @@ -212,7 +213,7 @@ irc_input_user_message_display (struct t_irc_server *server, { weechat_printf_date_tags ( ptr_buffer, - 0, + date, irc_protocol_tags ( server, command, @@ -236,7 +237,7 @@ irc_input_user_message_display (struct t_irc_server *server, { weechat_printf_date_tags ( ptr_buffer, - 0, + date, irc_protocol_tags ( server, command, @@ -268,7 +269,7 @@ irc_input_user_message_display (struct t_irc_server *server, { weechat_printf_date_tags ( ptr_buffer, - 0, + date, irc_protocol_tags ( server, command, @@ -334,6 +335,7 @@ irc_input_send_user_message (struct t_gui_buffer *buffer, int flags, { irc_input_user_message_display ( ptr_server, + 0, /* date */ ptr_channel->name, NULL, /* address */ "privmsg", diff --git a/src/plugins/irc/irc-input.h b/src/plugins/irc/irc-input.h index f4f43c139..a01c404da 100644 --- a/src/plugins/irc/irc-input.h +++ b/src/plugins/irc/irc-input.h @@ -20,9 +20,12 @@ #ifndef WEECHAT_PLUGIN_IRC_INPUT_H #define WEECHAT_PLUGIN_IRC_INPUT_H +#include <time.h> + struct t_gui_buffer; extern void irc_input_user_message_display (struct t_irc_server *server, + time_t date, const char *target, const char *address, const char *command, diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index d5172cb29..c5fb1e2a4 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -3021,6 +3021,7 @@ IRC_PROTOCOL_CALLBACK(pong) void irc_protocol_privmsg_display_ctcp_send (struct t_irc_server *server, + time_t date, const char *target, const char *address, const char *arguments) @@ -3046,6 +3047,7 @@ irc_protocol_privmsg_display_ctcp_send (struct t_irc_server *server, irc_input_user_message_display ( server, + date, target, address, "privmsg", @@ -3125,7 +3127,7 @@ IRC_PROTOCOL_CALLBACK(privmsg) if (nick_is_me) { irc_protocol_privmsg_display_ctcp_send ( - server, params[0], address, msg_args); + server, date, params[0], address, msg_args); } else { @@ -3243,7 +3245,7 @@ IRC_PROTOCOL_CALLBACK(privmsg) if (nick_is_me && cap_echo_message && !msg_already_received) { irc_protocol_privmsg_display_ctcp_send ( - server, remote_nick, address, msg_args); + server, date, remote_nick, address, msg_args); } else { |