lockmaprotation option

master
Lee Salzman 2013-01-26 02:15:14 +02:00
parent 6f4b86d7a1
commit d05cc357ae
2 changed files with 5 additions and 2 deletions

View File

@ -50,6 +50,9 @@ updatemaster 1
// restrictpausegame 1
// whether or not to allow players to vote on maps not in the rotation
// when 1 requires master
// when 2 requires admin
// when 0 allows any votes (default)
// lockmaprotation 0
ffamaps = [

View File

@ -452,7 +452,7 @@ namespace server
vector<maprotation> maprotations;
int curmaprotation = 0;
VAR(lockmaprotation, 0, 0, 1);
VAR(lockmaprotation, 0, 0, 2);
void maprotationreset()
{
@ -2065,7 +2065,7 @@ namespace server
if(idx < 0) return;
map = maprotations[idx].map;
}
if(lockmaprotation && !ci->privilege && !ci->local && findmaprotation(reqmode, map) < 0)
if(lockmaprotation && !ci->local && ci->privilege < (lockmaprotation > 1 ? PRIV_ADMIN : PRIV_MASTER) && findmaprotation(reqmode, map) < 0)
{
sendf(sender, 1, "ris", N_SERVMSG, "This server has locked the map rotation.");
return;