[V3] Unmute has odd behaviour on admins #2076

Closed
opened 2018-09-01 21:02:48 +02:00 by coltoutram · 9 comments
coltoutram commented 2018-09-01 21:02:48 +02:00 (Migrated from github.com)

Command bugs

Command name

Unmute

What cog is this command from?

Mod

What were you expecting to happen?

Unmute someone from the server.

What actually happened?

It sent the "user has been unmuted from the server" but did not remove the permissions from the channels.

How can we reproduce this issue?

Mute someone using [p]mute server user and then [p]unmute server user and it will not remove the permissions from the channels.

# Command bugs <!-- Did you find a bug with a command? Fill out the following: --> #### Command name Unmute #### What cog is this command from? Mod #### What were you expecting to happen? Unmute someone from the server. #### What actually happened? It sent the "user has been unmuted from the server" but did not remove the permissions from the channels. #### How can we reproduce this issue? Mute someone using [p]mute server user and then [p]unmute server user and it will not remove the permissions from the channels.
coltoutram commented 2018-09-03 00:37:44 +02:00 (Migrated from github.com)

What kind of info is needed?

What kind of info is needed?
Ray-MRQ commented 2018-09-03 18:09:46 +02:00 (Migrated from github.com)

traceback error... if there is one

edit: "but did not remove the permissions from the channels." that doesn't mean they weren't unmuted it just means the user profile on the channel wasn't removed if you check it the write perm was re-enabled (if i understood that correctly)

traceback error... if there is one edit: "but did not remove the permissions from the channels." that doesn't mean they weren't unmuted it just means the user profile on the channel wasn't removed if you check it the write perm was re-enabled (if i understood that correctly)
Zephyrkul commented 2018-09-03 18:58:43 +02:00 (Migrated from github.com)

I've been playing around with this a little. This is in a test server with no special channel overwrites beyond an admin role that has access to a private category, text channel, and voice channel. This isn't full QA by any means but it's what I found while messing around with it.

Mute:
For every channel the bot and member have access to...
Categories and VCs are denied the Speak permission.
Text channels are denied Send Messages and Add Reactions.
(As a small note this causes categories and their text channels to no longer be in sync.)
No traceback in console.

Unmute:
I got a couple different results depending on the member's permissions.
If the member has the admin override, nothing happens. Overwrites set via Mute are as they were.
If the member has no admin override, text channel overwrites are deleted, while category and VC overwrites for that member are set to all None (including for categories / VCs that were not touched by mute beforehand).
The bot having a higher role than the member or not has no effect on the above behavior.
No traceback in console in either case.

I've been playing around with this a little. This is in a test server with no special channel overwrites beyond an admin role that has access to a private category, text channel, and voice channel. This isn't full QA by any means but it's what I found while messing around with it. Mute: For every channel the bot and member have access to... Categories and VCs are denied the Speak permission. Text channels are denied Send Messages and Add Reactions. (As a small note this causes categories and their text channels to no longer be in sync.) No traceback in console. Unmute: I got a couple different results depending on the member's permissions. If the member has the admin override, nothing happens. Overwrites set via Mute are as they were. If the member has no admin override, text channel overwrites are deleted, while category and VC overwrites for that member are set to all None (including for categories / VCs that were not touched by mute beforehand). The bot having a higher role than the member or not has no effect on the above behavior. No traceback in console in either case.
coltoutram commented 2018-09-05 17:51:32 +02:00 (Migrated from github.com)

The bot has the highest role and none of the users I am trying to mute have a role above the BOT, I'm confused why mute works but unmute does not, any info?

The bot has the highest role and none of the users I am trying to mute have a role above the BOT, I'm confused why mute works but unmute does not, any info?
Zephyrkul commented 2018-09-05 17:52:50 +02:00 (Migrated from github.com)

Literally that big ol' comment directly above yours was a huge infodump when I tested this issue out. Give it a read if you want info.

Literally that big ol' comment directly above yours was a huge infodump when I tested this issue out. Give it a read if you want info.
coltoutram commented 2018-09-05 17:55:54 +02:00 (Migrated from github.com)

Yes I read that, from what I understand it does not work the way it is intended to?

Yes I read that, from what I understand it does not work the way it is intended to?
Zephyrkul commented 2018-09-05 18:00:59 +02:00 (Migrated from github.com)

As it stands, based on my testing, [p]unmute does function, though it could use improvements. In my testing it only ever failed to unmute members who had the Administrator override in their permissions, which allows them to bypass channel permissions. So muting/unmuting doesn't affect them either way. Since currently the bot only unmutes in channels the member can't send messages to, it doesn't change permissions for Administrator members.

In other words, since the muted member was an Administrator, they were never muted in the first place, so there's nothing to unmute, so the bot didn't touch channel overwrites.

As it stands, based on my testing, `[p]unmute` does *function*, though it could use improvements. In my testing it only ever failed to unmute members who had the Administrator override in their permissions, which allows them to bypass channel permissions. So muting/unmuting doesn't affect them either way. Since currently the bot only unmutes in channels the member can't send messages to, it doesn't change permissions for Administrator members. In other words, since the muted member was an Administrator, they were never muted in the first place, so there's nothing to unmute, so the bot didn't touch channel overwrites.
coltoutram commented 2018-09-05 18:39:47 +02:00 (Migrated from github.com)

I see now, I'm confused why it mutes people with administrator but then does not unmute them though

I see now, I'm confused why it mutes people with administrator but then does not unmute them though
Tobotimus commented 2018-10-12 06:48:09 +02:00 (Migrated from github.com)

Resolved by #2230.

Resolved by #2230.
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot#2076
No description provided.