2001-10-20 15:52:07 -04:00
|
|
|
#include "module.h"
|
|
|
|
|
2001-11-12 04:13:12 -05:00
|
|
|
static GSList *register_hash2list(HV *hv)
|
|
|
|
{
|
|
|
|
HE *he;
|
|
|
|
GSList *list;
|
|
|
|
|
|
|
|
if (hv == NULL)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
list = NULL;
|
|
|
|
hv_iterinit(hv);
|
|
|
|
while ((he = hv_iternext(hv)) != NULL) {
|
|
|
|
I32 len;
|
|
|
|
char *key = hv_iterkey(he, &len);
|
|
|
|
int value = (int)SvIV(HeVAL(he));
|
|
|
|
|
|
|
|
list = g_slist_append(list, g_strdup(key));
|
|
|
|
list = g_slist_append(list, GINT_TO_POINTER(value));
|
|
|
|
}
|
|
|
|
return list;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GSList *event_hash2list(HV *hv)
|
|
|
|
{
|
|
|
|
HE *he;
|
|
|
|
GSList *list;
|
|
|
|
STRLEN n_a;
|
|
|
|
|
|
|
|
if (hv == NULL)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
list = NULL;
|
|
|
|
hv_iterinit(hv);
|
|
|
|
while ((he = hv_iternext(hv)) != NULL) {
|
|
|
|
I32 len;
|
|
|
|
char *key = hv_iterkey(he, &len);
|
|
|
|
char *value = SvPV(HeVAL(he), n_a);
|
|
|
|
|
|
|
|
list = g_slist_append(list, g_strdup(key));
|
|
|
|
list = g_slist_append(list, g_strdup(value));
|
|
|
|
}
|
|
|
|
return list;
|
|
|
|
}
|
|
|
|
|
2001-10-20 15:52:07 -04:00
|
|
|
MODULE = Irssi::Irc::Server PACKAGE = Irssi::Irc::Server PREFIX = irc_server_
|
|
|
|
PROTOTYPES: ENABLE
|
2000-10-01 16:48:48 -04:00
|
|
|
|
|
|
|
char *
|
|
|
|
irc_server_get_channels(server)
|
|
|
|
Irssi::Irc::Server server
|
|
|
|
|
2000-10-18 16:50:12 -04:00
|
|
|
void
|
|
|
|
send_raw(server, cmd)
|
|
|
|
Irssi::Irc::Server server
|
|
|
|
char *cmd
|
|
|
|
CODE:
|
|
|
|
irc_send_cmd(server, cmd);
|
|
|
|
|
|
|
|
void
|
|
|
|
send_raw_now(server, cmd)
|
|
|
|
Irssi::Irc::Server server
|
|
|
|
char *cmd
|
|
|
|
CODE:
|
|
|
|
irc_send_cmd_now(server, cmd);
|
|
|
|
|
|
|
|
void
|
|
|
|
send_raw_split(server, cmd, nickarg, max_nicks)
|
|
|
|
Irssi::Irc::Server server
|
|
|
|
char *cmd
|
|
|
|
int nickarg
|
|
|
|
int max_nicks
|
|
|
|
CODE:
|
|
|
|
irc_send_cmd_split(server, cmd, nickarg, max_nicks);
|
|
|
|
|
2001-01-07 04:54:21 -05:00
|
|
|
void
|
|
|
|
ctcp_send_reply(server, data)
|
|
|
|
Irssi::Irc::Server server
|
|
|
|
char *data
|
2000-12-06 00:03:11 -05:00
|
|
|
|
2001-11-11 13:59:19 -05:00
|
|
|
MODULE = Irssi::Irc::Server PACKAGE = Irssi::Irc::Server PREFIX = server_
|
|
|
|
|
|
|
|
void
|
2001-11-12 04:13:12 -05:00
|
|
|
server_redirect_register(command, remote, timeout, start, stop)
|
2001-11-11 13:59:19 -05:00
|
|
|
char *command
|
|
|
|
int remote
|
|
|
|
int timeout
|
2001-11-12 04:13:12 -05:00
|
|
|
void *start
|
|
|
|
void *stop
|
2001-11-11 13:59:19 -05:00
|
|
|
CODE:
|
2001-11-12 04:13:12 -05:00
|
|
|
server_redirect_register_list(command, remote, timeout,
|
|
|
|
register_hash2list(hvref(ST(3))),
|
|
|
|
register_hash2list(hvref(ST(4))));
|
2001-11-11 13:59:19 -05:00
|
|
|
|
|
|
|
void
|
2001-11-12 17:15:04 -05:00
|
|
|
server_redirect_event(server, command, count, arg, remote, failure_signal, signals)
|
2001-11-11 13:59:19 -05:00
|
|
|
Irssi::Irc::Server server
|
|
|
|
char *command
|
2001-11-12 17:15:04 -05:00
|
|
|
int count
|
2001-11-11 13:59:19 -05:00
|
|
|
char *arg
|
|
|
|
int remote
|
|
|
|
char *failure_signal
|
2001-11-12 04:13:12 -05:00
|
|
|
void *signals
|
2001-11-11 13:59:19 -05:00
|
|
|
CODE:
|
2001-11-12 17:15:04 -05:00
|
|
|
server_redirect_event_list(server, command, count, *arg == '\0' ? NULL : arg, remote,
|
2001-11-12 09:49:21 -05:00
|
|
|
*failure_signal == '\0' ? NULL : failure_signal,
|
2001-11-12 04:13:12 -05:00
|
|
|
event_hash2list(hvref(ST(5))));
|
|
|
|
|
|
|
|
char *
|
|
|
|
server_redirect_get_signal(server, event, args)
|
|
|
|
Irssi::Irc::Server server
|
|
|
|
char *event
|
|
|
|
char *args
|
|
|
|
CODE:
|
|
|
|
RETVAL = (char *) server_redirect_get_signal(server, event, args);
|
|
|
|
OUTPUT:
|
|
|
|
RETVAL
|
|
|
|
|
|
|
|
char *
|
|
|
|
server_redirect_peek_signal(server, event, args)
|
|
|
|
Irssi::Irc::Server server
|
|
|
|
char *event
|
|
|
|
char *args
|
|
|
|
CODE:
|
|
|
|
RETVAL = (char *) server_redirect_peek_signal(server, event, args);
|
|
|
|
OUTPUT:
|
|
|
|
RETVAL
|
2001-11-11 13:59:19 -05:00
|
|
|
|
2001-10-20 15:52:07 -04:00
|
|
|
MODULE = Irssi::Irc::Server PACKAGE = Irssi::Irc::Connect PREFIX = irc_server_
|
2000-10-01 16:48:48 -04:00
|
|
|
|
|
|
|
Irssi::Irc::Server
|
|
|
|
irc_server_connect(conn)
|
|
|
|
Irssi::Irc::Connect conn
|