private bool checkPriv(BUser user, string player) { if (user.isAdmin) return true; foreach (Player p in Scala.getPlayers(user)) { if (p.name == player) return true; } return false; }
public static List<Player> getPlayers(BUser user) { if (user.isAdmin) { return players; } List<Player> results = new List<Player>(); foreach (Player p in players) { if (user.players.Contains(p.name)) { results.Add(p); } } return results; }