1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Add option hideSystemMessages to hide server messages on client

Use "set hideSystemMessages on" in client console to activate.
This commit is contained in:
Arseniy Shestakov 2016-09-26 16:05:27 +03:00
parent a03419e7d9
commit 99dcb44851
2 changed files with 8 additions and 1 deletions

View File

@ -724,10 +724,17 @@ void processCommand(const std::string &message)
Settings conf = settings.write["session"][what];
readed >> value;
if (value == "on")
{
conf->Bool() = true;
logGlobal->info("Option %s enabled!", what);
}
else if (value == "off")
{
conf->Bool() = false;
logGlobal->info("Option %s disabled!", what);
}
}
else if(cn == "sinfo")
{

View File

@ -787,7 +787,7 @@ void SystemMessage::applyCl( CClient *cl )
str << "System message: " << text;
logNetwork->errorStream() << str.str(); // usually used to receive error messages from server
if(LOCPLINT)
if(LOCPLINT && !settings["session"]["hideSystemMessages"].Bool())
LOCPLINT->cingconsole->print(str.str());
}