function drush_ip2country_lookup_validate in IP-based Determination of a Visitor's Country 8
Same name and namespace in other branches
- 7 ip2country.drush.inc \drush_ip2country_lookup_validate()
Implements drush_hook_COMMAND_validate() for ip2country-lookup.
Requires user to specify one IPV4 on the command line.
File
- ./
ip2country.drush.inc, line 122 - ip2country module integration with Drush 8 and earlier.
Code
function drush_ip2country_lookup_validate() {
$ipv4 = drush_get_arguments();
// $ipv4[0] is the command name, $ipv4[1] is the required argument.
if (!isset($ipv4[1])) {
drush_set_error('DRUSH_IP2COUNTRY_MISSING_ARG', dt('Usage: drush ip2country-lookup IPV4' . PHP_EOL . PHP_EOL . "Try 'drush help ip2country-lookup' for more information."));
}
}