diff options
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/core/irc-cap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/irc/core/irc-cap.c b/src/irc/core/irc-cap.c index dd720841..1a60d99b 100644 --- a/src/irc/core/irc-cap.c +++ b/src/irc/core/irc-cap.c @@ -158,11 +158,12 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add continue; } - if (!g_hash_table_insert(server->cap_supported, key, val)) { + if (g_hash_table_lookup_extended(server->cap_supported, key, NULL, NULL)) { /* The specification doesn't say anything about * duplicated values, let's just warn the user */ g_warning("The server sent the %s capability twice", key); } + g_hash_table_insert(server->cap_supported, key, val); } /* A multiline response is always terminated by a normal one, |