diff -ruN nagiosplug-save/plugins-scripts/check_wave.pl nagiosplug/plugins-scripts/check_wave.pl
--- nagiosplug-save/plugins-scripts/check_wave.pl	2002-10-28 13:05:08.000000000 +0000
+++ nagiosplug/plugins-scripts/check_wave.pl	2004-03-27 23:17:43.000000000 +0000
@@ -2,85 +2,76 @@
 #
 # $Id: check_wave.pl,v 1.4 2002/10/28 13:05:08 kdebisschop Exp $
 
-
+require 5.004;
 use strict;
-use lib utils.pm;
-use utils qw($TIMEOUT %ERRORS &print_revision &support);
-use vars qw($PROGNAME);
-use Getopt::Long;
-use vars qw($opt_V $opt_h $verbose $opt_w $opt_c $opt_H);
+use lib utils.pm ;
+use Plugin;
+use Plugin::Parameter qw(:DEFAULT :standard :thresholds);
+
+use vars qw($PROGNAME $opt_t
+	    $opt_w $opt_c $opt_H);
+
+use utils qw(%ERRORS);
+
+$w_opt->optional("yes");
+$c_opt->optional("yes");
+my $plugin = new Plugin(-revision => '$Revision: 1.4 $',
+			-copyright => "2000 Jeffery Blank/Karl DeBisschop, 2004 Howard Wilkinson <howard\@cohtech.com>",
+			-shortcomment => "Plugin to test signal strength on Speedlan Wireless Equipment",
+			-parameterlists => [ [ $H_opt, $w_opt, $c_opt, $t_opt ], $h_opts, $V_opts ]);
+
 my (@test, $low1, $med1, $high1, $snr, $low2, $med2, $high2);
 my ($low, $med, $high, $lowavg, $medavg, $highavg, $tot, $ss);
 
-$PROGNAME = "check_wave";
-sub print_help ();
-sub print_usage ();
+my $snmpget = "/usr/bin/snmpget";
 
 $ENV{'PATH'}='';
 $ENV{'BASH_ENV'}='';
 $ENV{'ENV'}='';
 
-Getopt::Long::Configure('bundling');
-GetOptions
-	("V"   => \$opt_V, "version"    => \$opt_V,
-	 "h"   => \$opt_h, "help"       => \$opt_h,
-	 "v" => \$verbose, "verbose"  => \$verbose,
-	 "w=s" => \$opt_w, "warning=s"  => \$opt_w,
-	 "c=s" => \$opt_c, "critical=s" => \$opt_c,
-	 "H=s" => \$opt_H, "hostname=s" => \$opt_H);
-
-if ($opt_V) {
-	print_revision($PROGNAME,'$Revision: 1.4 $'); #'
-	exit $ERRORS{'OK'};
-}
+$plugin->init();
 
-if ($opt_h) {
-	print_help();
-	exit $ERRORS{'OK'};
-}
+my $host = $opt_H;
 
-$opt_H = shift unless ($opt_H);
-print_usage() unless ($opt_H);
-my $host = $1 if ($opt_H =~ m/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z][-a-zA-Z0]+(\.[a-zA-Z][-a-zA-Z0]+)*)$/);
-print_usage() unless ($host);
+my $critical = $1 if (defined $opt_c && $opt_c =~ /([0-9]+)/);
 
-($opt_c) || ($opt_c = shift) || ($opt_c = 120);
-my $critical = $1 if ($opt_c =~ /([0-9]+)/);
+my $warning = $1 if (defined $opt_w && $opt_w =~ /([0-9]+)/);
 
-($opt_w) || ($opt_w = shift) || ($opt_w = 60);
-my $warning = $1 if ($opt_w =~ /([0-9]+)/);
+$plugin->start_timeout($opt_t, "Timed out while retrieving signal data");
 
-$low1 = `snmpget $host public .1.3.6.1.4.1.74.2.21.1.2.1.8.1`;
+$low1 = `$snmpget -v 1 -c public $host .1.3.6.1.4.1.74.2.21.1.2.1.8.1`;
 @test = split(/ /,$low1);
 $low1 = $test[2];
 
-$med1 = `snmpget $host public .1.3.6.1.4.1.74.2.21.1.2.1.9.1`;
+$med1 = `$snmpget -v 1 -c public $host .1.3.6.1.4.1.74.2.21.1.2.1.9.1`;
 @test = split(/ /,$med1);
 $med1 = $test[2];
 
-$high1 = `snmpget $host public .1.3.6.1.4.1.74.2.21.1.2.1.10.1`;
+$high1 = `$snmpget -v 1 -c public $host .1.3.6.1.4.1.74.2.21.1.2.1.10.1`;
 @test = split(/ /,$high1);
 $high1 = $test[2];
 
 sleep(2);
 
-$snr = `snmpget $host public .1.3.6.1.4.1.762.2.5.2.1.17.1`;
+$snr = `$snmpget -v 1 -c public $host .1.3.6.1.4.1.762.2.5.2.1.17.1`;
 @test = split(/ /,$snr);
 $snr = $test[2];
 $snr = int($snr*25);
 
-$low2 = `snmpget $host public .1.3.6.1.4.1.74.2.21.1.2.1.8.1`;
+$low2 = `$snmpget -v 1 -c public $host .1.3.6.1.4.1.74.2.21.1.2.1.8.1`;
 @test = split(/ /,$low2);
 $low2 = $test[2];
 
-$med2 = `snmpget $host public .1.3.6.1.4.1.74.2.21.1.2.1.9.1`;
+$med2 = `$snmpget -v 1 -c public $host .1.3.6.1.4.1.74.2.21.1.2.1.9.1`;
 @test = split(/ /,$med2);
 $med2 = $test[2];
 
-$high2 = `snmpget $host public .1.3.6.1.4.1.74.2.21.1.2.1.10.1`;
+$high2 = `$snmpget -v 1 -c public $host .1.3.6.1.4.1.74.2.21.1.2.1.10.1`;
 @test = split(/ /,$high2);
 $high2 = $test[2];
 
+$plugin->stop_timeout();
+
 $low = $low2 - $low1;
 $med = $med2 - $med1;
 $high = $high2 - $high1;
@@ -96,28 +87,14 @@
 	$ss = ($medavg*50) + ($highavg*100);
 }
 
-printf("Signal Strength at: %3.0f%,  SNR at $snr%",$ss);
+my $state = 'OK';
 
 if ($ss<$critical) {
-	exit(2);
+	$state = 'CRITICAL';
 } elsif ($ss<$warning) {
-	exit(1);
-} else {
-	exit(0);
+	$state = 'WARNING';
 }
 
+printf("$PROGNAME $state: Signal Strength at: %3.0f%,  SNR at $snr%",$ss);
 
-sub print_usage () {
-	print "Usage: $PROGNAME -H <host> [-w <warn>] [-c <crit>]\n";
-}
-
-sub print_help () {
-	print_revision($PROGNAME,'$Revision: 1.4 $');
-	print "Copyright (c) 2000 Jeffery Blank/Karl DeBisschop\n";
-	print "\n";
-	print_usage();
-	print "\n";
-	print "<warn> = Signal strength at which a warning message will be generated.\n";
-	print "<crit> = Signal strength at which a critical message will be generated.\n\n";
-	support();
-}
+exit $ERRORS{$state};
