diff options
author | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2018-02-08 14:41:02 +0100 |
---|---|---|
committer | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2018-02-08 14:41:08 +0100 |
commit | 16912e1a911a503d1ee83ea42dd20c0d5b543e9a (patch) | |
tree | 85c41742eef9572451873d539282edcadfa02203 | |
parent | 02712942e033c467da1c473c34fb4d631e0a0d23 (diff) | |
download | irssi-16912e1a911a503d1ee83ea42dd20c0d5b543e9a.zip |
restore compat with glib <2.40
-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, |