1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Merge pull request #840 from ailin-nemui/caps

ensure cap_supported is existent yet
This commit is contained in:
ailin-nemui 2018-02-07 21:22:18 +01:00 committed by GitHub
commit 538bd9148e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 8 deletions

View File

@ -6,7 +6,7 @@
#define IRSSI_GLOBAL_CONFIG "irssi.conf" /* config file name in /etc/ */
#define IRSSI_HOME_CONFIG "config" /* config file name in ~/.irssi/ */
#define IRSSI_ABI_VERSION 14
#define IRSSI_ABI_VERSION 15
#define DEFAULT_SERVER_ADD_PORT 6667
#define DEFAULT_SERVER_ADD_TLS_PORT 6697

View File

@ -37,6 +37,7 @@ static void perl_irc_server_fill_hash(HV *hv, IRC_SERVER_REC *server)
(void) hv_store(hv, "cap_complete", 12, newSViv(server->cap_complete), 0);
(void) hv_store(hv, "sasl_success", 12, newSViv(server->sasl_success), 0);
if (server->cap_supported != NULL) {
hv_ = newHV();
g_hash_table_iter_init(&iter, server->cap_supported);
while (g_hash_table_iter_next(&iter, &key_, &val_)) {
@ -45,6 +46,7 @@ static void perl_irc_server_fill_hash(HV *hv, IRC_SERVER_REC *server)
hv_store(hv_, key, strlen(key), new_pv(val), 0);
}
(void) hv_store(hv, "cap_supported", 13, newRV_noinc((SV*)hv_), 0);
}
av = newAV();
for (tmp = server->cap_active; tmp != NULL; tmp = tmp->next)