summaryrefslogtreecommitdiff
path: root/src/environment.cpp
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-07-17 06:30:21 +0200
committerest31 <MTest31@outlook.com>2015-07-17 06:37:16 +0200
commitbf7174f3f98f0ac665e093aaa3e332f8bd29b64b (patch)
tree800a92674f526bae4073e3ceeef3896363c2bacf /src/environment.cpp
parentf9dbec6edf94ce20d52d38569545674cfb742eae (diff)
downloadminetest-bf7174f3f98f0ac665e093aaa3e332f8bd29b64b.tar.gz
minetest-bf7174f3f98f0ac665e093aaa3e332f8bd29b64b.tar.bz2
minetest-bf7174f3f98f0ac665e093aaa3e332f8bd29b64b.zip
Server kicks: make messages configurable, cache wstring
Diffstat (limited to 'src/environment.cpp')
-rw-r--r--src/environment.cpp3
1 files changed, 2 insertions, 1 deletions
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<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);
}
}