1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-03 08:13:14 +02:00

irc: fix wrong time displayed for CTCP messages received from self nick (closes #2000)

This commit is contained in:
Sébastien Helleu
2023-08-18 23:57:35 +02:00
parent 1fe1e1a1e8
commit 64cb3e6a63
5 changed files with 21 additions and 7 deletions
+1
View File
@@ -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`
+6
View File
@@ -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",
+7 -5
View File
@@ -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",
+3
View File
@@ -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,
+4 -2
View File
@@ -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
{