diff options
author | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2018-02-09 11:49:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-09 11:49:23 +0100 |
commit | 946876b1e9db5d764cecb3f884fc3075765dc94d (patch) | |
tree | 1b65ac577ef4019d3a5bb18511869bf496937295 /src | |
parent | 7c31f7adc5685074d25a32737c9743089850675c (diff) | |
parent | 16912e1a911a503d1ee83ea42dd20c0d5b543e9a (diff) | |
download | irssi-946876b1e9db5d764cecb3f884fc3075765dc94d.zip |
Merge pull request #843 from ailin-nemui/glib238
restore compat with glib <2.40
Diffstat (limited to 'src')
-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, |