1
0
mirror of https://github.com/irssi/irssi.git synced 2024-07-07 02:54:19 -04:00

When msg list is full, remove old messages, not new messages..

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1077 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-01-06 15:39:36 +00:00 committed by cras
parent 9f7f4395bf
commit ba4b59d134

View File

@ -87,8 +87,10 @@ static void last_msg_add(GSList **list, const char *nick, int own, int max)
rec = g_new(LAST_MSG_REC, 1);
rec->nick = g_strdup(nick);
if (g_slist_length(*list) == max)
*list = g_slist_remove(*list, (*list)->data);
if (g_slist_length(*list) == max) {
*list = g_slist_remove(*list,
g_slist_last(*list)->data);
}
rec->own = own ? max : 0;
}