summaryrefslogtreecommitdiff
path: root/src/irc/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc/core')
-rw-r--r--src/irc/core/massjoin.c8
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);