From 6100ca32b75e0953156cb3dd5dfb146ff4208ca8 Mon Sep 17 00:00:00 2001 From: Stephen L Johnson Date: Tue, 4 Jun 2002 01:39:59 +0000 Subject: [PATCH] Init add to CVS repository --- contrib/plugins/spong-server/pre_redirect | 64 +++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 contrib/plugins/spong-server/pre_redirect diff --git a/contrib/plugins/spong-server/pre_redirect b/contrib/plugins/spong-server/pre_redirect new file mode 100644 index 0000000..c51ca5a --- /dev/null +++ b/contrib/plugins/spong-server/pre_redirect @@ -0,0 +1,64 @@ +=head1 NAME + +B - spong-network predata module that redirects update messages +to other spong-servers + +=head1 DESCRIPTION + +This is a pre data plugin module for the Spong L program. This +module redirects incoming update messages to other spong-servers. It is used to +selective redirect certain status messages to another Spong Server Host or +another Spong Server instance. + +=cut + +# pre_redirect - Redirect selective spong messages to other Spong Servers + +# $Id: pre_redirect,v 1.1 2002/06/04 01:39:59 sljohnson Exp $ + +use Spong::Status "0.02"; + +# Register the routine with the plugin registry +$PREDATAFUNCS{'redirect'} = \&pre_redirect; + +$SENDMSG_SERVERS = "localhost:19980"; + +sub pre_redirect { + my( $msg ) = @_; + + + my $tmp_msg = $msg->{'header'} . "\n" . $msg->{'message'}; + + my $errmsg = Spong::Status::SendMsg( $SENDMSG_SERVERS, + $main::SPONG_UPDATE_PORT, $tmp_msg ); + + main::error("pre_redirect: $errmsg") if $errmsg; + +} + +1; + + +__END__ + +=head2 Configuration + + +=head1 EXAMPLES + + +=head1 SEE ALSO + +L, L, +L + +=head1 RESTRICTIONS + +B uses the C library module to work. It uses the +new capability to send a status message to multiple servers. It is only +available in versions 0.02 and up of the Spong::Status module. + +=head1 AUTHOR + +Stephen L Johnson >. + -- 2.30.2