server: split off new server command 'queries'

Instead of being part of the ping command, create a separate
queries command, which is easier for updating. Ie. 'ping' implies "show
main screen" but we don't always want that side-effect.
This commit is contained in:
Dirk-Jan C. Binnema
2023-01-07 10:29:57 +02:00
parent beb2bef8dd
commit ef2ec7d5a5
2 changed files with 32 additions and 22 deletions

View File

@ -106,8 +106,7 @@ CommandHandler::invoke(const Command& cmd, bool do_validate) const
const auto cmit{cmap_.find(cmd.name())};
if (cmit == cmap_.cend())
return Err(Error::Code::Command,
"unknown command in command '%s'",
cmd.to_string().c_str());
"unknown command '%s'", cmd.to_string().c_str());
const auto& cmd_info{cmit->second};
if (do_validate) {