diff --git a/src/API/ConsoleAPI.php b/src/API/ConsoleAPI.php index 54c4ddbe..4d1eda54 100644 --- a/src/API/ConsoleAPI.php +++ b/src/API/ConsoleAPI.php @@ -245,7 +245,11 @@ class ConsoleAPI{ if(($d1 = $this->server->api->dhandle("console.command.".$cmd, array("cmd" => $cmd, "parameters" => $params, "issuer" => $issuer, "alias" => $alias))) === false or ($d2 = $this->server->api->dhandle("console.command", array("cmd" => $cmd, "parameters" => $params, "issuer" => $issuer, "alias" => $alias))) === false){ - $output = "You don't have permissions to use this command.\n"; + if(in_array(strtolower($cmd), array_keys($this->cmds))){ + $output = "You don't have permissions to use this command.\n"; + }else{ + $output = "Command doesn't exist! Use /help\n"; + } }elseif($d1 !== true and (!isset($d2) or $d2 !== true)){ if(isset($this->cmds[$cmd]) and is_callable($this->cmds[$cmd])){ $output = @call_user_func($this->cmds[$cmd], $cmd, $params, $issuer, $alias);