From 320a00e7c65c43c2aa64d1da6e855428101c4aa6 Mon Sep 17 00:00:00 2001 From: PilzAdam Date: Fri, 12 Jul 2013 00:53:30 +0200 Subject: [PATCH] Disallow the name 'singleplayer' in a multiplayer server --- src/server.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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 "<