Add "reset" subcommand to tagtypes.

This subcommand combines "clear" and "enable" in one command.
This commit is contained in:
jcorporation
2024-11-01 18:07:06 +01:00
parent acb9ee9792
commit fd7d251358
3 changed files with 10 additions and 1 deletions

View File

@@ -107,6 +107,10 @@ handle_tagtypes(Client &client, Request request, Response &r)
} else if (StringIsEqual(cmd, "available")) {
tag_print_types_available(r);
return CommandResult::OK;
} else if (StringIsEqual(cmd, "reset")) {
client.tag_mask = TagMask::None();
client.tag_mask |= ParseTagMask(request);
return CommandResult::OK;
} else {
r.Error(ACK_ERROR_ARG, "Unknown sub command");
return CommandResult::ERROR;