Properly report channel bans in .bans #1525
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Found by: @wilkowy
Patch by: Geo
Fixes: #1297
One-line summary:
Properly report channel bans with .bans
Additional description (if needed):
Prior to this patch, .bans was inconsistent in reporting as the help described.... it was inconsistent enough where I struggle to even capture what didn't work. The two major points were running .bans with a console of '*' only reported channels bans of the first channel in the channel record, and
.bans #channel
didn't report the bans on the requested channel.Test cases demonstrating functionality (if applicable):
For these examples, #eggdroptest has no active bans that are in the global banlist but does have active bans that are in the channel banlist. #eggtest has one active bans that is in the global banlist, and one active bans in the channel banlist.
Specific test cases below are:
show active global and channel bans for the console channel
show active global and channel bans for a channel that is not the console channel
show all global bans stored on the bot (active and inactive), and all channel bans for the console channel stored on the bot
match a mask for the console channel
with a console set to *, use .bans show all active global and channel bans for all channels
with a console set to *, use .bans all to show all global and channel bans stored on the bot
with a console set to *, use matching to match all bans matching a mask