mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-06-28 13:14:16 -04:00
nuke get option
This commit is contained in:
parent
fa4f144b9d
commit
94292e02fb
5 changed files with 1 additions and 260 deletions
|
|
@ -351,16 +351,6 @@ static void handle_command(int client_fd, const char *cmd_raw) {
|
|||
return;
|
||||
}
|
||||
resp = build_monitor_tags_response(m);
|
||||
} else if (strncmp(cmd, "get option ", 11) == 0) {
|
||||
cJSON *val = read_option(&config, cmd + 11);
|
||||
if (!val) {
|
||||
send_static_json(client_fd,
|
||||
"{\"error\":\"unknown or unreadable option\"}\n");
|
||||
return;
|
||||
}
|
||||
resp = cJSON_CreateObject();
|
||||
cJSON_AddStringToObject(resp, "option", cmd + 11);
|
||||
cJSON_AddItemToObject(resp, "value", val);
|
||||
} else if (strncmp(cmd, "dispatch ", 9) == 0) {
|
||||
char *dispatch_copy = strdup(cmd_raw + 9);
|
||||
char *out = dispatch_copy, *ptr = dispatch_copy;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue