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:
commit
538bd9148e
@ -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
|
||||
|
@ -37,14 +37,16 @@ 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);
|
||||
|
||||
hv_ = newHV();
|
||||
g_hash_table_iter_init(&iter, server->cap_supported);
|
||||
while (g_hash_table_iter_next(&iter, &key_, &val_)) {
|
||||
char *key = (char *)key_;
|
||||
char *val = (char *)val_;
|
||||
hv_store(hv_, key, strlen(key), new_pv(val), 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_)) {
|
||||
char *key = (char *)key_;
|
||||
char *val = (char *)val_;
|
||||
hv_store(hv_, key, strlen(key), new_pv(val), 0);
|
||||
}
|
||||
(void) hv_store(hv, "cap_supported", 13, newRV_noinc((SV*)hv_), 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)
|
||||
|
Loading…
Reference in New Issue
Block a user