1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Check that the nick doesn't get added twice to nicklist, seems to happen sometimes.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2280 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-12-22 02:28:22 +00:00 committed by cras
parent acffe7b322
commit c15769685c

View File

@ -56,6 +56,14 @@ static void event_join(IRC_SERVER_REC *server, const char *data,
g_free(params);
if (chanrec == NULL) return;
/* check that the nick isn't already in nicklist. seems to happen
sometimes (server desyncs or something?) */
nickrec = nicklist_find(CHANNEL(chanrec), nick);
if (nickrec != NULL) {
/* destroy the old record */
nicklist_remove(CHANNEL(chanrec), nickrec);
}
/* add user to nicklist */
nickrec = irc_nicklist_insert(chanrec, nick, FALSE, FALSE, FALSE, TRUE);
nicklist_set_host(CHANNEL(chanrec), nickrec, address);