private static void ResolvedPrivileges(PlayerInfo pi, Privileges priv) { Player player = Player.FindByUserId(pi.UserId); // Player isn't in the server any more, just stop it. if (player == null) { return; } OnAssignPrivileges(player, priv == null ? player.Privileges : priv); }
internal static void OnAssignPrivileges(Player player, Privileges privileges) { player.Privileges = privileges; var args = new AssignPrivilegesEventArgs(player); OnAssignPrivileges(args); player.OnPlayerAssignPrivileges(args); PlayerInfo pi = new PlayerInfo(player); SharpMod.Database.GetActiveBan(pi, ResolvedBans); }
public BanInfo(Player admin, Player target, TimeSpan duration, string reason) : base(admin) { // PlayerAuthId = target.AuthID; Player = new PlayerInfo(target); Duration = duration; Reason = reason; }
public void ReloadPrivileges() { PlayerInfo pi = new PlayerInfo(this); SharpMod.Database.LoadPrivileges(pi, delegate (Privileges priv) { ResolvedPrivileges(pi, priv); }); }
public AdminCommandInfo(PlayerInfo admin) : this() { Admin = admin; }