1
0
forked from bip/bip

Fix fatal Element with key %s already in hash

on client disconnect.
bad hash usage
This commit is contained in:
Arnaud Cornet 2008-12-29 09:14:24 +01:00
parent b222196b18
commit 8d7eecf78b

View File

@ -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