mirror of
https://github.com/weechat/weechat.git
synced 2026-06-30 06:46:38 +02:00
irc: fix random date displayed when a received message contains tags but no "time" (closes #2064)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user