Merge pull request 'chat disable perms added' (#18) from chat-disable-perms into main
Reviewed-on: #18
This commit was merged in pull request #18.
This commit is contained in:
@@ -8,4 +8,5 @@ public enum GroupPermissions
|
||||
PreferDisableSounds = 0x2,
|
||||
DisableInvites = 0x4,
|
||||
PreferDisableVFX = 0x8,
|
||||
DisableChat = 0x10,
|
||||
}
|
||||
@@ -24,6 +24,11 @@ public static class GroupPermissionsExtensions
|
||||
return perm.HasFlag(GroupPermissions.PreferDisableVFX);
|
||||
}
|
||||
|
||||
public static bool IsDisableChat(this GroupPermissions perm)
|
||||
{
|
||||
return perm.HasFlag(GroupPermissions.DisableChat);
|
||||
}
|
||||
|
||||
public static void SetDisableInvites(this ref GroupPermissions perm, bool set)
|
||||
{
|
||||
if (set) perm |= GroupPermissions.DisableInvites;
|
||||
@@ -47,4 +52,10 @@ public static class GroupPermissionsExtensions
|
||||
if (set) perm |= GroupPermissions.PreferDisableVFX;
|
||||
else perm &= ~GroupPermissions.PreferDisableVFX;
|
||||
}
|
||||
|
||||
public static void SetDisableChat(this ref GroupPermissions perm, bool set)
|
||||
{
|
||||
if (set) perm |= GroupPermissions.DisableChat;
|
||||
else perm &= ~GroupPermissions.DisableChat;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user