From: PilzAdam Date: Thu, 11 Jul 2013 22:53:30 +0000 (+0200) Subject: Disallow the name 'singleplayer' in a multiplayer server X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=320a00e7c65c43c2aa64d1da6e855428101c4aa6;p=zefram%2Fminetest%2Fminetest_engine.git Disallow the name 'singleplayer' in a multiplayer server --- diff --git a/src/server.cpp b/src/server.cpp index 1618a091..60bf422f 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -1922,6 +1922,15 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) return; } + if(!isSingleplayer() && strcasecmp(playername, "singleplayer") == 0) + { + actionstream<<"Server: Player with an invalid name " + <<"tried to connect from "<