mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-11-04 16:44:28 -05:00
Kotz's editorconfig styles slightly modified. Target typed new usage. Brackets in expressions used for clarity.
This commit is contained in:
@@ -31,10 +31,10 @@ public static class PermissionExtensions
|
||||
//false = applicable, not allowed
|
||||
public static bool? CheckPermission(this Permissionv2 perm, IUserMessage message, string commandName, string moduleName)
|
||||
{
|
||||
if (!(perm.SecondaryTarget == SecondaryPermissionType.Command &&
|
||||
perm.SecondaryTargetName.ToLowerInvariant() == commandName.ToLowerInvariant() ||
|
||||
perm.SecondaryTarget == SecondaryPermissionType.Module &&
|
||||
perm.SecondaryTargetName.ToLowerInvariant() == moduleName.ToLowerInvariant() ||
|
||||
if (!((perm.SecondaryTarget == SecondaryPermissionType.Command &&
|
||||
perm.SecondaryTargetName.ToLowerInvariant() == commandName.ToLowerInvariant()) ||
|
||||
(perm.SecondaryTarget == SecondaryPermissionType.Module &&
|
||||
perm.SecondaryTargetName.ToLowerInvariant() == moduleName.ToLowerInvariant()) ||
|
||||
perm.SecondaryTarget == SecondaryPermissionType.AllModules))
|
||||
return null;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace NadekoBot.Modules.Permissions.Common;
|
||||
|
||||
public class PermissionsCollection<T> : IndexedCollection<T> where T : class, IIndexed
|
||||
{
|
||||
private readonly object _localLocker = new object();
|
||||
private readonly object _localLocker = new();
|
||||
public PermissionsCollection(IEnumerable<T> source) : base(source)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user