public ServerPermissions0_9(ulong id, string name) { Id = id; PermissionsControllerRole = "Nadeko"; Verbose = true; Permissions = new Permissions(name); Permissions.Modules.TryAdd("NSFW", false); UserPermissions = new Dictionary<ulong, Permissions>(); ChannelPermissions = new Dictionary<ulong, Permissions>(); RolePermissions = new Dictionary<ulong, Permissions>(); CommandCooldowns = new ConcurrentDictionary<string, int>(); Words = new HashSet<string>(); }
public void CopyFrom(Permissions other) { Modules.Clear(); foreach (var mp in other.Modules) Modules.AddOrUpdate(mp.Key, mp.Value, (s, b) => mp.Value); Commands.Clear(); foreach (var cp in other.Commands) Commands.AddOrUpdate(cp.Key, cp.Value, (s, b) => cp.Value); FilterInvites = other.FilterInvites; FilterWords = other.FilterWords; }