diff options
author | Timo Sirainen <cras@irssi.org> | 2001-11-11 18:59:19 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-11-11 18:59:19 +0000 |
commit | 850cf993eb8d5e20b9b845e42e4bdae1a6cae81f (patch) | |
tree | 76ac7694abd05394ae84e10763b406be88ad86aa /src/perl/irc | |
parent | 712f3b383da947f5c565fba3695dbcd02136ce4b (diff) | |
download | irssi-850cf993eb8d5e20b9b845e42e4bdae1a6cae81f.zip |
Moved rewritten server redirection code from core to irc. This new code
should be able to do the redirecting a lot more error-proof. Changed
lag-checking to use PINGs instead of NOTIFYs. This breaks scripts using
redirection. Hopefully this doesn't break too much things in irssi :)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1980 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl/irc')
-rw-r--r-- | src/perl/irc/Server.xs | 38 | ||||
-rw-r--r-- | src/perl/irc/module.h | 1 |
2 files changed, 39 insertions, 0 deletions
diff --git a/src/perl/irc/Server.xs b/src/perl/irc/Server.xs index 44813fe6..f1d9f62f 100644 --- a/src/perl/irc/Server.xs +++ b/src/perl/irc/Server.xs @@ -35,6 +35,44 @@ ctcp_send_reply(server, data) Irssi::Irc::Server server char *data +MODULE = Irssi::Irc::Server PACKAGE = Irssi::Irc::Server PREFIX = server_ + +void +server_redirect_register(command, remote, timeout, ...) + char *command + int remote + int timeout +PREINIT: + STRLEN n_a; + GSList *start, *stop, **list; + int n; +CODE: + start = stop = NULL; list = &start; + for (n = 3; n < items; n++) { + if (ST(n) == &PL_sv_undef) list = &stop; + if (SvPOK(ST(n))) + *list = g_slist_append(*list, SvPV(ST(n), n_a)); + } + server_redirect_register_list(command, remote, timeout, start, stop); + +void +server_redirect_event(server, command, arg, remote, failure_signal, ...) + Irssi::Irc::Server server + char *command + char *arg + int remote + char *failure_signal +PREINIT: + STRLEN n_a; + GSList *list; + int n; +CODE: + list = NULL; + for (n = 5; n < items; n++) { + list = g_slist_append(list, SvPV(ST(n), n_a)); + } + server_redirect_event_list(server, command, arg, remote, failure_signal, list); + MODULE = Irssi::Irc::Server PACKAGE = Irssi::Irc::Connect PREFIX = irc_server_ Irssi::Irc::Server diff --git a/src/perl/irc/module.h b/src/perl/irc/module.h index 112837a9..d90bb1bf 100644 --- a/src/perl/irc/module.h +++ b/src/perl/irc/module.h @@ -10,6 +10,7 @@ #include "modes.h" #include "mode-lists.h" #include "netsplit.h" +#include "servers-redirect.h" #include "dcc/dcc.h" #include "dcc/dcc-file.h" |