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:
parent
acffe7b322
commit
c15769685c
@ -56,6 +56,14 @@ static void event_join(IRC_SERVER_REC *server, const char *data,
|
|||||||
g_free(params);
|
g_free(params);
|
||||||
if (chanrec == NULL) return;
|
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 */
|
/* add user to nicklist */
|
||||||
nickrec = irc_nicklist_insert(chanrec, nick, FALSE, FALSE, FALSE, TRUE);
|
nickrec = irc_nicklist_insert(chanrec, nick, FALSE, FALSE, FALSE, TRUE);
|
||||||
nicklist_set_host(CHANNEL(chanrec), nickrec, address);
|
nicklist_set_host(CHANNEL(chanrec), nickrec, address);
|
||||||
|
Loading…
Reference in New Issue
Block a user