Gimps the restart vote. (#9327)

* Disables the restart vote when admins are online.

* Gimps the restart vote so it requires 85% agreement.

* address rebiew
This commit is contained in:
Moony
2022-07-01 02:52:20 -05:00
committed by GitHub
parent 57e5b06fe3
commit efdc3bc7e0
2 changed files with 11 additions and 1 deletions

View File

@@ -322,6 +322,10 @@ namespace Content.Server.Voting.Managers
if (voteType != null && _standardVoteTimeout.TryGetValue(voteType.Value, out timeSpan))
return false;
// No, seriously, stop spamming the restart vote!
if (voteType == StandardVoteType.Restart && _cfg.GetCVar(CCVars.VoteRestartNotAllowedWhenAdminOnline) && _adminMgr.ActiveAdmins.Count() != 0)
return false;
return !_voteTimeout.TryGetValue(initiator.UserId, out timeSpan);
}