From 6a36f0c727f87baa9f2cb74fee872ab2c73bd30c Mon Sep 17 00:00:00 2001
From: Stephen L Johnson <sjohnson@monsters.org>
Date: Sun, 4 Dec 2005 19:31:21 +0000
Subject: [PATCH] fixed parm processing bug with $PAGE_MESSAGE (using uc
 instead of lc) add '--page' paramter to spong-message call when sending
 'page' message

---
 src/spong-server.pl | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/spong-server.pl b/src/spong-server.pl
index 59bb7c9..b804253 100755
--- a/src/spong-server.pl
+++ b/src/spong-server.pl
@@ -6,7 +6,7 @@
 # There are one or more update processes that listen for status updates 
 # from client programs.
 
-# $Id: spong-server.pl,v 1.63 2003/07/17 02:45:33 sljohnson Exp $
+# $Id: spong-server.pl,v 1.64 2005/12/04 19:31:21 sljohnson Exp $
 
 use lib "@@LIBDIR@@";
 
@@ -1260,10 +1260,10 @@ sub message_user {
                            $message );
          }
       }
-   } elsif ( $cmd eq "page" && uc($PAGE_MESSAGE) eq 'yes' ) {
+   } elsif ( $cmd eq "page" && lc($PAGE_MESSAGE) eq 'yes' ) {
       &debug("sending a page message notification",2);
       &send_message( $host, $service, $color, $time, $sum, $duration,
-                     $message );
+                     $message, 1 );
    }
 
    $SIG{'CHLD'} = \&chld_handler;
@@ -1273,13 +1273,14 @@ sub message_user {
 # spong-message.  
 
 sub send_message {
-   my ( $host, $service, $color, $time, $sum, $duration, $message ) = @_; 
+   my ( $host, $service, $color, $time, $sum, $duration, $message, $page ) = @_; 
 
    if ( -f $smessage ) {
       my @args;
       push @args,$smessage;
       if( $debug >= 3 ) { push @args,"--debug"; }
       if( $test )       { push @args,"--test"; }
+      if( $page )       { push @args,"--page"; }
       if( $message )    { push @args,"--message",$message; }
       push @args, $color, $host, $service, $time, $sum, $duration;
       system(@args);
-- 
2.30.2