diff options
author | Timo Sirainen <cras@irssi.org> | 2001-12-22 02:28:22 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-12-22 02:28:22 +0000 |
commit | c15769685c8cd409b3b3cc21ce43aeb15659141c (patch) | |
tree | b9fea1e68a5700c3982b02d9a43032af280032aa /src/irc/core | |
parent | acffe7b322d15fb063366a4242753064a7612f32 (diff) | |
download | irssi-c15769685c8cd409b3b3cc21ce43aeb15659141c.zip |
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
Diffstat (limited to 'src/irc/core')
-rw-r--r-- | src/irc/core/massjoin.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/irc/core/massjoin.c b/src/irc/core/massjoin.c index 71a46edc..563ec02b 100644 --- a/src/irc/core/massjoin.c +++ b/src/irc/core/massjoin.c @@ -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); |