add debug command to track statistics and debug client connections

The `debug` command shows info useful to develpers of the client and
server
This commit is contained in:
Lion Kortlepel
2022-10-26 14:15:56 +02:00
parent 692129cb81
commit c717037895
3 changed files with 96 additions and 0 deletions

View File

@@ -36,6 +36,7 @@ private:
void Command_Status(const std::string& cmd, const std::vector<std::string>& args);
void Command_Settings(const std::string& cmd, const std::vector<std::string>& args);
void Command_Clear(const std::string&, const std::vector<std::string>& args);
void Command_Debug(const std::string&, const std::vector<std::string>& args);
void Command_Say(const std::string& FullCommand);
bool EnsureArgsCount(const std::vector<std::string>& args, size_t n);
@@ -52,6 +53,7 @@ private:
{ "status", [this](const auto& a, const auto& b) { Command_Status(a, b); } },
{ "settings", [this](const auto& a, const auto& b) { Command_Settings(a, b); } },
{ "clear", [this](const auto& a, const auto& b) { Command_Clear(a, b); } },
{ "debug", [this](const auto& a, const auto& b) { Command_Debug(a, b); } },
{ "say", [this](const auto&, const auto&) { Command_Say(""); } }, // shouldn't actually be called
};