*** check_dns.c	Thu Dec 19 17:37:50 2002
--- new_check_dns.c	Thu Dec 19 18:19:12 2002
***************
*** 351,375 ****
  		}
  	}
  
  	c = optind;
! 	if (query_address[0] == 0) {
! 		if (is_host (argv[c]) == FALSE) {
! 			printf ("Invalid name/address: %s\n\n", argv[c]);
! 			return ERROR;
  		}
! 		if (strlen (argv[c]) >= ADDRESS_LENGTH)
! 			terminate (STATE_UNKNOWN, "Input buffer overflow\n");
! 		strcpy (query_address, argv[c++]);
! 	}
! 
! 	if (dns_server[0] == 0) {
! 		if (is_host (argv[c]) == FALSE) {
! 			printf ("Invalid name/address: %s\n\n", argv[c]);
! 			return ERROR;
  		}
- 		if (strlen (argv[c]) >= ADDRESS_LENGTH)
- 			terminate (STATE_UNKNOWN, "Input buffer overflow\n");
- 		strcpy (dns_server, argv[c++]);
  	}
  
  	return validate_arguments ();
--- 351,378 ----
  		}
  	}
  
+ 	/* Nice section for those who don't use the -H and -s tags */
  	c = optind;
! 	if (c < argc) { 
! 		if (query_address[0] == 0) {
! 			if (is_host (argv[c]) == FALSE) {
! 				printf ("Invalid name/address: %s\n\n", argv[c]);
! 					return ERROR;
! 			}
! 			if (strlen (argv[c]) >= ADDRESS_LENGTH)
! 				terminate (STATE_UNKNOWN, "Input buffer overflow\n");
! 			strcpy (query_address, argv[c++]);
  		}
! 	
! 		if (dns_server[0] == 0) {
! 			if (is_host (argv[c]) == FALSE) {
! 				printf ("Invalid name/address: %s\n\n", argv[c]);
! 				return ERROR;
! 			}
! 			if (strlen (argv[c]) >= ADDRESS_LENGTH)
! 				terminate (STATE_UNKNOWN, "Input buffer overflow\n");
! 			strcpy (dns_server, argv[c++]);
  		}
  	}
  
  	return validate_arguments ();
