1
0
mirror of https://github.com/irssi/irssi.git synced 2025-02-02 15:08:01 -05:00

Merge pull request #843 from ailin-nemui/glib238

restore compat with glib <2.40
This commit is contained in:
ailin-nemui 2018-02-09 11:49:23 +01:00 committed by GitHub
commit 946876b1e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,