public static void NotBan(int recordId) { CandidateToBan target = new CandidateToBan(recordId); target.IsWhitelisted = true; target.Save(); }
public static void TryAdd(int userId, string note) { if (!CandidateToBanManager.IsWhiteListedOrDuplicated(userId, note)) { CandidateToBan Newly = new CandidateToBan(); Newly.UserId = userId; Newly.DateOccured = DateTime.Now; Newly.Note = note; Newly.Type = AntiCheatRuleType.SameIPAddress; //Always the same Newly.IsWhitelisted = false; Newly.Save(); } }