Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix double unmutes/unbans on !aegis #163

Merged
merged 2 commits into from
Oct 3, 2024
Merged

Fix double unmutes/unbans on !aegis #163

merged 2 commits into from
Oct 3, 2024

Conversation

11k
Copy link
Contributor

@11k 11k commented Oct 2, 2024

No description provided.

11k added 2 commits October 2, 2024 16:06
When generating a list of all users to unmute/unban with `!aegis`, we
combine the values in the `aegisCache`, an object that maps nuked
phrases to affected users, and the `singleUserAegisCache`, an object
that maps affected users to nuked phrases. This always results in
duplicate entries. Simply omitting the users in the `aegisCache` fixes
the issue.

The `singleUserAegisCache` is more complete because it includes users
who typed the banned phrase after the nuke was issued.
Operations having to do with issuing nuke punishments and undoing said
punishments rely on the `singleUserAegisCache` map and the
`nukedPhrases` array. It appears the `aegisCache` offers no utility, so
it can be removed.
@11k 11k added the bug Something isn't working label Oct 2, 2024
@11k 11k requested a review from vyneer October 2, 2024 23:08
@11k 11k merged commit 328e86e into master Oct 3, 2024
@11k 11k deleted the fix/double-unmute branch October 3, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants