From bf7174f3f98f0ac665e093aaa3e332f8bd29b64b Mon Sep 17 00:00:00 2001 From: est31 Date: Fri, 17 Jul 2015 06:30:21 +0200 Subject: Server kicks: make messages configurable, cache wstring --- src/environment.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/environment.cpp') diff --git a/src/environment.cpp b/src/environment.cpp index cad1f298b..d22982b68 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -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::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); } } -- cgit v1.2.3