Auto DeAdmin sooner (#26551)

Co-authored-by: wrexbe <wrexbe@protonmail.com>
This commit is contained in:
Wrexbe (Josh)
2024-03-31 13:49:51 -07:00
committed by GitHub
parent d2bee7ec91
commit 6d1511124f
3 changed files with 21 additions and 22 deletions

View File

@@ -763,10 +763,6 @@ public sealed class NukeopsRuleSystem : GameRuleSystem<NukeopsRuleComponent>
_mind.SetUserId(newMind, nukieSession.Session.UserId);
_roles.MindAddRole(newMind, new NukeopsRoleComponent { PrototypeId = nukieSession.Type.AntagRoleProto });
// Automatically de-admin players who are being made nukeops
if (_cfg.GetCVar(CCVars.AdminDeadminOnJoin) && _adminManager.IsAdmin(nukieSession.Session))
_adminManager.DeAdmin(nukieSession.Session);
_mind.TransferTo(newMind, mob);
}
//Otherwise, spawn as a ghost role