mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Server kicks: make messages configurable, cache wstring
This commit is contained in:
parent
f9dbec6edf
commit
bf7174f3f9
4 changed files with 14 additions and 4 deletions
|
@ -428,10 +428,11 @@ bool ServerEnvironment::line_of_sight(v3f pos1, v3f pos2, float stepsize, v3s16
|
|||
|
||||
void ServerEnvironment::kickAllPlayers(const std::string &reason)
|
||||
{
|
||||
std::wstring wreason = utf8_to_wide(reason);
|
||||
for (std::vector<Player*>::iterator it = m_players.begin();
|
||||
it != m_players.end();
|
||||
++it) {
|
||||
((Server*)m_gamedef)->DenyAccess_Legacy((*it)->peer_id, utf8_to_wide(reason));
|
||||
((Server*)m_gamedef)->DenyAccess_Legacy((*it)->peer_id, wreason);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue