From bc87d98b2f6e6c214dfe8bdf47a21c7fd1e9d25a Mon Sep 17 00:00:00 2001 From: Stephen L Johnson Date: Tue, 22 Feb 2000 05:17:36 +0000 Subject: [PATCH] added 'page' message type support --- src/spong-status.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/spong-status.pl b/src/spong-status.pl index 6a4b2af..7a64ac6 100755 --- a/src/spong-status.pl +++ b/src/spong-status.pl @@ -42,7 +42,7 @@ if( ! GetOptions( \%opt, @options ) ) { warn "Incorrect usage:\n\n"; &help(); } my($cmd, $host, $service, $color, $summary, $ttl) = @ARGV; if (! $cmd && defined $opt{'cmd'}) { $cmd = $opt{'cmd'}; } -if ( $cmd !~ m/status|event/ ) { warn "Invalid cmd\n\n"; &help(); } +if ( $cmd !~ m/status|event|page/ ) { warn "Invalid cmd\n\n"; &help(); } if ( ! $host && defined $opt{'host'} ) { $host = $opt{'host'}; } if ( ! $host ) { warn "Host is required\n\n"; &help(); } if ( ! $service && defined $opt{'service'} ) { $service = $opt{'service'}; } @@ -80,9 +80,13 @@ if ( $cmd eq 'status' ) { } elsif ( $cmd eq 'event') { Spong::Status::event( $SPONGSERVER, $host, $service, $color, $summary, $message, $ttl ); +} elsif ( $cmd eq 'page') { + Spong::Status::page( $SPONGSERVER, $host, $service, $color, $summary, + $message, $ttl ); } + exit 0; sub help { -- 2.30.2