Skip to content

Commit

Permalink
Fix VIP command permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
715209 committed Jun 7, 2024
1 parent 5e6bc99 commit 85afa08
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/chat/chat_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,12 @@ fn permission_is_allowed(
permission: &chat::Permission,
user_permission: &chat::Permission,
) -> bool {
permission == &chat::Permission::Public
|| (permission == &chat::Permission::Mod && user_permission == &chat::Permission::Mod)
matches!(
(permission, user_permission),
(&Permission::Public, _)
| (&Permission::Mod, &Permission::Mod)
| (&Permission::Vip, &Permission::Mod | &Permission::Vip)
)
}

fn try_get_command_from_alias(
Expand Down

0 comments on commit 85afa08

Please sign in to comment.