mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 03:40:16 +02:00
nick_hash_remove(): GLIB didn't change the hash table key like I thought, so
we need to first remove it from the hash, then insert again.. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1376 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
f33ec66a27
commit
118aa7e88e
1 changed files with 5 additions and 4 deletions
|
|
@ -60,11 +60,12 @@ static void nick_hash_remove(CHANNEL_REC *channel, NICK_REC *nick)
|
|||
if (list == NULL)
|
||||
return;
|
||||
|
||||
if (list->next == NULL)
|
||||
if (list == nick || list->next == NULL) {
|
||||
g_hash_table_remove(channel->nicks, nick->nick);
|
||||
else if (list == nick) {
|
||||
g_hash_table_insert(channel->nicks, nick->next->nick,
|
||||
nick->next);
|
||||
if (list == nick) {
|
||||
g_hash_table_insert(channel->nicks, nick->next->nick,
|
||||
nick->next);
|
||||
}
|
||||
} else {
|
||||
while (list->next != nick)
|
||||
list = list->next;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue