From 16912e1a911a503d1ee83ea42dd20c0d5b543e9a Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Thu, 8 Feb 2018 14:41:02 +0100 Subject: restore compat with glib <2.40 --- src/irc/core/irc-cap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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, -- cgit v1.2.3