Add config option to turn off chat logging

When LogChat is disabled, using the `say` command in the console will
trigger a "chat message sent!" reply, as UX feedback.
This commit is contained in:
Lion Kortlepel
2022-02-06 21:37:51 +01:00
parent fdb7c9ce71
commit 17c571811a
4 changed files with 20 additions and 9 deletions

View File

@@ -177,16 +177,18 @@ std::string Version::AsString() {
}
void LogChatMessage(const std::string& name, int id, const std::string& msg) {
std::stringstream ss;
ss << ThreadName();
ss << "[CHAT] ";
if (id != -1) {
ss << "(" << id << ") <" << name << "> ";
} else {
ss << name << "";
if (Application::Settings.LogChat) {
std::stringstream ss;
ss << ThreadName();
ss << "[CHAT] ";
if (id != -1) {
ss << "(" << id << ") <" << name << "> ";
} else {
ss << name << "";
}
ss << msg;
Application::Console().Write(ss.str());
}
ss << msg;
Application::Console().Write(ss.str());
}
std::string GetPlatformAgnosticErrorString() {