Skip to content

Update filtering.py to reduce nickname alert spam#2573

Merged
wookie184 merged 2 commits into
mainfrom
filtering-nickname-check-fix
May 2, 2023
Merged

Update filtering.py to reduce nickname alert spam#2573
wookie184 merged 2 commits into
mainfrom
filtering-nickname-check-fix

Conversation

@lxnn
Copy link
Copy Markdown
Contributor

@lxnn lxnn commented May 1, 2023

This updates the on_voice_state_update listener of the filtering cog.

Currently, it calls self._check_bad_name where it should call self._check_bad_display_name. The difference is that the latter method rate-limits how often a filtering alert is sent for a specific user's display name. Using the former method results in spammy alerts when a user with a bad display name is in a voice channel.

This updates the `on_voice_state_update` listener of the filtering cog.

Currently, it calls `self._check_bad_name` where it should call `self._check_bad_display_name`. The difference is that the latter method rate-limits how often a filtering alert is sent for a specific user's display name. Using the former method results in spammy alerts when a user with a bad display name is in a voice channel.
@lxnn lxnn requested a review from mbaruh as a code owner May 1, 2023 22:43
Copy link
Copy Markdown
Contributor

@Xithrius Xithrius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although I did not test this, the code itself looks good to me.

@Xithrius Xithrius added a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) a: filters Related to message filters: (antimalware, antispam, filtering, token_remover) p: 2 - normal Normal Priority t: enhancement Changes or improvements to existing features s: needs review Author is waiting for someone to review and approve labels May 2, 2023
@mbaruh mbaruh added t: bug Something isn't working and removed t: enhancement Changes or improvements to existing features labels May 2, 2023
Copy link
Copy Markdown
Contributor

@wookie184 wookie184 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@wookie184 wookie184 enabled auto-merge May 2, 2023 17:36
@wookie184 wookie184 merged commit 5f1c7b1 into main May 2, 2023
@wookie184 wookie184 deleted the filtering-nickname-check-fix branch May 2, 2023 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) a: filters Related to message filters: (antimalware, antispam, filtering, token_remover) p: 2 - normal Normal Priority s: needs review Author is waiting for someone to review and approve t: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants