diff --git a/rts/Net/GameServer.cpp b/rts/Net/GameServer.cpp index ff15b081b2f..9a1ce18e3d7 100644 --- a/rts/Net/GameServer.cpp +++ b/rts/Net/GameServer.cpp @@ -70,7 +70,7 @@ using boost::format; CONFIG(int, AutohostPort).defaultValue(0); CONFIG(int, SpeedControl).defaultValue(1).minimumValue(1).maximumValue(2) .description("Sets how server adjusts speed according to player's load (CPU), 1: use average, 2: use highest"); -CONFIG(bool, AllowSpectatorJoin).defaultValue(true).description("allow any unauthenticated clients to join as spectator with any unchecked name, thus permitting impersonation"); +CONFIG(bool, AllowSpectatorJoin).defaultValue(false).description("allow any unauthenticated clients to join as spectator with any name, name will be prefixed with ~"); CONFIG(bool, WhiteListAdditionalPlayers).defaultValue(true); CONFIG(bool, ServerRecordDemos).defaultValue(false).dedicatedValue(true); CONFIG(bool, ServerLogInfoMessages).defaultValue(false); @@ -2625,6 +2625,9 @@ unsigned CGameServer::BindConnection(std::string name, const std::string& passwd // not found in the original start script, allow spector join? if (errmsg.empty() && newPlayerNumber >= players.size()) { + if (!demoReader && allowSpecJoin) { //add prefix to "anonymous" spectators (#4949) + name = std::string("~") + name; + } if (demoReader || allowSpecJoin) AddAdditionalUser(name, passwd); else