Fix #18: Respond Ok to silent commands that don't error

This commit is contained in:
John Reese 2012-10-26 11:26:38 -07:00
parent aa45b69466
commit 80cd975377
1 changed files with 12 additions and 0 deletions

View File

@ -967,6 +967,8 @@ class CPushMod : public CModule
options[option] = value; options[option] = value;
SetNV(option, options[option]); SetNV(option, options[option]);
PutModule("Ok");
} }
} }
// APPEND command // APPEND command
@ -995,6 +997,8 @@ class CPushMod : public CModule
options[option] += " " + value; options[option] += " " + value;
options[option].Trim(); options[option].Trim();
SetNV(option, options[option]); SetNV(option, options[option]);
PutModule("Ok");
} }
} }
// PREPEND command // PREPEND command
@ -1023,6 +1027,8 @@ class CPushMod : public CModule
options[option] = value + " " + options[option]; options[option] = value + " " + options[option];
options[option].Trim(); options[option].Trim();
SetNV(option, options[option]); SetNV(option, options[option]);
PutModule("Ok");
} }
} }
// UNSET command // UNSET command
@ -1045,6 +1051,8 @@ class CPushMod : public CModule
{ {
options[option] = defaults[option]; options[option] = defaults[option];
DelNV(option); DelNV(option);
PutModule("Ok");
} }
} }
// GET command // GET command
@ -1271,12 +1279,16 @@ class CPushMod : public CModule
sock->Connect(service_host, use_port, use_ssl); sock->Connect(service_host, use_port, use_ssl);
sock->Request(use_post, service_host, service_url, params, service_auth); sock->Request(use_post, service_host, service_url, params, service_auth);
AddSocket(sock); AddSocket(sock);
PutModule("Ok");
} }
// SEND command // SEND command
else if (action == "send") else if (action == "send")
{ {
CString message = command.Token(1, true, " ", true); CString message = command.Token(1, true, " ", true);
send_message(message); send_message(message);
PutModule("Ok");
} }
// HELP command // HELP command
else if (action == "help") else if (action == "help")