diff options
Diffstat (limited to 'src/perl/irc/Irc.xs')
-rw-r--r-- | src/perl/irc/Irc.xs | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/src/perl/irc/Irc.xs b/src/perl/irc/Irc.xs index db5c5f79..41690010 100644 --- a/src/perl/irc/Irc.xs +++ b/src/perl/irc/Irc.xs @@ -11,12 +11,15 @@ static void perl_irc_connect_fill_hash(HV *hv, IRC_SERVER_CONNECT_REC *conn) static void perl_irc_server_fill_hash(HV *hv, IRC_SERVER_REC *server) { - perl_irc_connect_fill_hash(hv, server->connrec); - perl_server_fill_hash(hv, (SERVER_REC *) server); + AV *av; + GSList *tmp; + + perl_irc_connect_fill_hash(hv, server->connrec); + perl_server_fill_hash(hv, (SERVER_REC *) server); - (void) hv_store(hv, "real_address", 12, new_pv(server->real_address), 0); - (void) hv_store(hv, "usermode", 8, new_pv(server->usermode), 0); - (void) hv_store(hv, "userhost", 8, new_pv(server->userhost), 0); + (void) hv_store(hv, "real_address", 12, new_pv(server->real_address), 0); + (void) hv_store(hv, "usermode", 8, new_pv(server->usermode), 0); + (void) hv_store(hv, "userhost", 8, new_pv(server->userhost), 0); (void) hv_store(hv, "max_cmds_at_once", 16, newSViv(server->max_cmds_at_once), 0); (void) hv_store(hv, "cmd_queue_speed", 15, newSViv(server->cmd_queue_speed), 0); @@ -27,6 +30,19 @@ static void perl_irc_server_fill_hash(HV *hv, IRC_SERVER_REC *server) (void) hv_store(hv, "max_modes_in_cmd", 16, newSViv(server->max_modes_in_cmd), 0); (void) hv_store(hv, "max_whois_in_cmd", 16, newSViv(server->max_whois_in_cmd), 0); (void) hv_store(hv, "isupport_sent", 13, newSViv(server->isupport_sent), 0); + + (void) hv_store(hv, "cap_complete", 12, newSViv(server->cap_complete), 0); + (void) hv_store(hv, "sasl_success", 12, newSViv(server->sasl_success), 0); + + av = newAV(); + for (tmp = server->cap_supported; tmp != NULL; tmp = tmp->next) + av_push(av, new_pv(tmp->data)); + (void) hv_store(hv, "cap_supported", 13, newRV_noinc((SV*)av), 0); + + av = newAV(); + for (tmp = server->cap_active; tmp != NULL; tmp = tmp->next) + av_push(av, new_pv(tmp->data)); + (void) hv_store(hv, "cap_active", 10, newRV_noinc((SV*)av), 0); } static void perl_ban_fill_hash(HV *hv, BAN_REC *ban) @@ -149,14 +165,14 @@ static void perl_notifylist_fill_hash(HV *hv, NOTIFYLIST_REC *notify) static void perl_client_fill_hash(HV *hv, CLIENT_REC *client) { (void) hv_store(hv, "nick", 4, new_pv(client->nick), 0); - (void) hv_store(hv, "host", 4, new_pv(client->host), 0); - (void) hv_store(hv, "port", 4, newSViv(client->port), 0); + (void) hv_store(hv, "addr", 4, new_pv(client->addr), 0); (void) hv_store(hv, "proxy_address", 13, new_pv(client->proxy_address), 0); (void) hv_store(hv, "server", 6, iobject_bless(client->server), 0); (void) hv_store(hv, "pass_sent", 9, newSViv(client->pass_sent), 0); (void) hv_store(hv, "user_sent", 9, newSViv(client->user_sent), 0); (void) hv_store(hv, "connected", 9, newSViv(client->connected), 0); (void) hv_store(hv, "want_ctcp", 9, newSViv(client->want_ctcp), 0); + (void) hv_store(hv, "multiplex", 9, newSViv(client->multiplex), 0); (void) hv_store(hv, "ircnet", 6, new_pv(client->listen->ircnet), 0); } |