Skip to content

Commit

Permalink
fix #4949
Browse files Browse the repository at this point in the history
  • Loading branch information
abma committed Sep 11, 2015
1 parent 47dfc1e commit 073afd3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rts/Net/GameServer.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down

1 comment on commit 073afd3

@ashdnazg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

err, changing the default wasn't agreed on anywhere.

Please sign in to comment.