From 8d7eecf78bb45b4205abd14923a3b3a3ce59b0e9 Mon Sep 17 00:00:00 2001 From: Arnaud Cornet Date: Mon, 29 Dec 2008 09:14:24 +0100 Subject: [PATCH] Fix fatal Element with key %s already in hash on client disconnect. bad hash usage --- src/irc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/irc.c b/src/irc.c index 800bd87..9b45fae 100644 --- a/src/irc.c +++ b/src/irc.c @@ -1631,7 +1631,7 @@ static int irc_mode(struct link_server *server, struct line *line) if (!hash_includes(&channel->ovmasks, nick)) return ERR_PROTOCOL; - ovmask = (long int)hash_get(&channel->ovmasks, nick); + ovmask = (long int)hash_remove(&channel->ovmasks, nick); if (add) ovmask |= NICKHALFOP; else @@ -1647,7 +1647,7 @@ static int irc_mode(struct link_server *server, struct line *line) if (!hash_includes(&channel->ovmasks, nick)) return ERR_PROTOCOL; - ovmask = (long int)hash_get(&channel->ovmasks, nick); + ovmask = (long int)hash_remove(&channel->ovmasks, nick); if (add) ovmask |= NICKVOICED; else