|
@@ -260,10 +260,17 @@ CmdMan::CmdRet CmdMan::cmdDeleteme(vector<string> args) {
|
|
CmdRet retval;
|
|
CmdRet retval;
|
|
DEBUGPRINT(string(__PRETTY_FUNCTION__) + " begin");
|
|
DEBUGPRINT(string(__PRETTY_FUNCTION__) + " begin");
|
|
Json::Value root;
|
|
Json::Value root;
|
|
-
|
|
|
|
|
|
+
|
|
root["command"] = "deleteme";
|
|
root["command"] = "deleteme";
|
|
- root["pass"] = args[0];
|
|
|
|
- retval.type = send;
|
|
|
|
|
|
+
|
|
|
|
+ if(args.size() < 1) {
|
|
|
|
+ retval.type = error;
|
|
|
|
+ root["accept"] = false;
|
|
|
|
+ root["error"] = "not enough arguments, at least 1 argument required";
|
|
|
|
+ } else {
|
|
|
|
+ retval.type = send;
|
|
|
|
+ root["pass"] = args[0];
|
|
|
|
+ }
|
|
retval.msg = root;
|
|
retval.msg = root;
|
|
|
|
|
|
return retval;
|
|
return retval;
|