private bool EvaluatePerms(DynamicPermissionBlock dynPerms, Command command, bool canRunState, Channel channel, ref string error) { string category = command.Category.ToLowerInvariant(); canRunState = EvalPermsExact(dynPerms.Allow.Modules, category, channel, canRunState, true, ref error); canRunState = EvalPermsExact(dynPerms.Deny.Modules, category, channel, canRunState, false, ref error); canRunState = EvalPermsCommands(dynPerms.Allow.Commands, command, channel, canRunState, true, ref error); canRunState = EvalPermsCommands(dynPerms.Deny.Commands, command, channel, canRunState, false, ref error); return canRunState; }
private bool EvaluatePerms(DynamicPermissionBlock dynPerms, Command command, bool canRunState, Channel channel, ref string error) { string category = command.Category.ToLowerInvariant(); canRunState = EvalPermsExact(dynPerms.Allow.Modules, category, channel, canRunState, true, ref error); canRunState = EvalPermsExact(dynPerms.Deny.Modules, category, channel, canRunState, false, ref error); canRunState = EvalPermsCommands(dynPerms.Allow.Commands, command, channel, canRunState, true, ref error); canRunState = EvalPermsCommands(dynPerms.Deny.Commands, command, channel, canRunState, false, ref error); return(canRunState); }
private bool IsInvalidChannelsInBlock(DynamicPermissionBlock block, Server server, out ulong invalidId) => IsInvalidChannelsInSet(block.Allow, server, out invalidId) || IsInvalidChannelsInSet(block.Deny, server, out invalidId);
private bool IsInvalidChannelsInBlock(DynamicPermissionBlock block, Server server, out ulong invalidId) => IsInvalidChannelsInSet(block.Allow, server, out invalidId) || IsInvalidChannelsInSet(block.Deny, server, out invalidId);