Code

Removed old terminate function (Bug 1093491)
[nagiosplug.git] / plugins / check_game.c
index 9a6e53e70480efdc0fe4df16661512882f8d1120..05b363af509259c1a4ebc8556306fb90d99835e0 100644 (file)
@@ -123,15 +123,15 @@ main (int argc, char **argv)
        }
 
        if (strstr (ret[2], QSTAT_HOST_ERROR)) {
-               printf ("CRITICAL - Host not found\n");
+               printf (_("CRITICAL - Host not found\n"));
                result = STATE_CRITICAL;
        }
        else if (strstr (ret[2], QSTAT_HOST_DOWN)) {
-               printf ("CRITICAL - Game server down or unavailable\n");
+               printf (_("CRITICAL - Game server down or unavailable\n"));
                result = STATE_CRITICAL;
        }
        else if (strstr (ret[2], QSTAT_HOST_TIMEOUT)) {
-               printf ("CRITICAL - Game server timeout\n");
+               printf (_("CRITICAL - Game server timeout\n"));
                result = STATE_CRITICAL;
        }
        else {
@@ -156,7 +156,6 @@ main (int argc, char **argv)
 }
 
 
-
 int
 process_arguments (int argc, char **argv)
 {
@@ -199,9 +198,7 @@ process_arguments (int argc, char **argv)
 
                switch (c) {
                case '?': /* args not parsable */
-                       printf (_("%s: Unknown argument: %s\n\n"), progname, optarg);
-                       print_usage ();
-                       exit (STATE_UNKNOWN);
+                       usage2 (_("Unknown argument"), optarg);
                case 'h': /* help */
                        print_help ();
                        exit (STATE_OK);
@@ -269,6 +266,7 @@ process_arguments (int argc, char **argv)
        return validate_arguments ();
 }
 
+
 int
 validate_arguments (void)
 {
@@ -291,18 +289,15 @@ validate_arguments (void)
 }
 
 
-
-
-
 void
 print_help (void)
 {
        print_revision (progname, revision);
 
        printf ("Copyright (c) 1999 Ian Cass, Knowledge Matters Limited\n");
-       printf (_(COPYRIGHT), copyright, email);
+       printf (COPYRIGHT, copyright, email);
 
-       printf (_("This plugin tests game server connections with the specified host."), progname);
+       printf (_("This plugin tests game server connections with the specified host."));
 
        print_usage ();