1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Added message of the day and made it properly configurable using /#setting (not saved to config file yet)

This commit is contained in:
Perttu Ahola 2011-07-30 19:31:33 +03:00
parent 4b0c3e4357
commit 9b294ffa7a
5 changed files with 65 additions and 3 deletions

View file

@ -3196,9 +3196,14 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
line += L"Server: ";
message = message.substr(commandprefix.size());
WStrfnd f1(message);
f1.next(L" ");
std::wstring paramstring = f1.next(L"");
ServerCommandContext *ctx = new ServerCommandContext(
str_split(message, L' '),
paramstring,
this,
&m_env,
player,
@ -4018,7 +4023,9 @@ std::wstring Server::getStatusString()
}
os<<L"}";
if(((ServerMap*)(&m_env.getMap()))->isSavingEnabled() == false)
os<<" WARNING: Map saving is disabled."<<std::endl;
os<<std::endl<<" WARNING: Map saving is disabled.";
if(g_settings.get("motd") != "")
os<<std::endl<<narrow_to_wide(g_settings.get("motd"));
return os.str();
}