1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 22:36:38 +02:00

irc: fix random date displayed when a received message contains tags but no "time" (issue #2064)

This commit is contained in:
Sébastien Helleu
2024-01-22 13:59:46 +01:00
parent e42e632408
commit f9cc10005c
7 changed files with 158 additions and 37 deletions
+7 -9
View File
@@ -173,19 +173,17 @@ record_match (struct t_hashtable *recorded_msg,
/*
* Searches if a prefix/message has been displayed in a buffer.
*
* Returns index of message displayed (≥ 0), -1 if message has NOT been
* displayed.
* Returns pointer to hashtable with the message found, NULL if the message
* has NOT been displayed.
*/
int
struct t_hashtable *
record_search (const char *buffer, const char *prefix, const char *message,
const char *tags)
{
int i, rc, size;
int i, size;
struct t_hashtable *rec_msg;
rc = -1;
size = arraylist_size (recorded_messages);
for (i = 0; i < size; i++)
@@ -198,12 +196,12 @@ record_search (const char *buffer, const char *prefix, const char *message,
&& record_match (rec_msg, "message_no_color", message)
&& (!tags || !tags[0] || record_match (rec_msg, "tags", tags)))
{
rc = i;
break;
return rec_msg;
}
}
return rc;
/* message not displayed */
return NULL;
}
/*