Some file server related things

This commit is contained in:
WolverinDEV
2020-07-30 11:40:03 +02:00
parent 7a974677fb
commit 3f700e79d3
14 changed files with 77 additions and 46 deletions
+6 -6
View File
@@ -2127,11 +2127,11 @@ command_result ConnectedClient::handleCommandLogView(ts::Command& cmd) {
this->sendCommand(result);
#else
constexpr static std::array<std::string_view, 5> log_output{
"The command 'logview' is not supported anymore.",
"In order to lookup the server actions use 'logquery'.",
"",
"located at your TeaSpeak installation folder. All logs could be found there.",
"If you need to lookup the TeaSpeak - Server logs, please visit the 'logs/' folder,",
"located at your TeaSpeak installation folder. All logs could be found there."
"",
"In order to lookup the server actions use 'logquery'.",
"The command 'logview' is not supported anymore."
};
command_builder result{this->getExternalType() == ClientType::CLIENT_TEAMSPEAK ? "notifyserverlog" : ""};
@@ -2141,13 +2141,13 @@ command_result ConnectedClient::handleCommandLogView(ts::Command& cmd) {
size_t index{0};
if(lagacy) {
for(const auto& message : log_output) {
std::string line{"2020-06-27 00:00.0000|CRITICAL|Server Instance | |"};
std::string line{"2020-06-27 00:00.000" + std::to_string(index) + "|CRITICAL|Server Instance | |"};
line += message;
result.put_unchecked(index++, "l", line);
}
} else {
for(const auto& message : log_output) {
std::string line{"[2020-06-27 00:00:00][ERROR] "};
std::string line{"[2020-06-27 00:00:0" + std::to_string(index) + "][ERROR] "};
line += message;
result.put_unchecked(index++, "l", line);
}