summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorailin-nemui <ailin-nemui@users.noreply.github.com>2018-02-09 11:49:23 +0100
committerGitHub <noreply@github.com>2018-02-09 11:49:23 +0100
commit946876b1e9db5d764cecb3f884fc3075765dc94d (patch)
tree1b65ac577ef4019d3a5bb18511869bf496937295 /src
parent7c31f7adc5685074d25a32737c9743089850675c (diff)
parent16912e1a911a503d1ee83ea42dd20c0d5b543e9a (diff)
downloadirssi-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.c3
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,