-
Notifications
You must be signed in to change notification settings - Fork 51
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
Speech filter tweaks #1097
base: master
Are you sure you want to change the base?
Speech filter tweaks #1097
Conversation
Reviewer's Guide by SourceryThis pull request modifies the speech filter to improve its regex and hide messages from admins if they are not relevant. It also adds a new admin bypass for the speech filter. Sequence diagram for modified speech filter flowsequenceDiagram
actor User
participant SF as Speech Filter
participant Admin as Admin System
User->>SF: Sends message
SF->>SF: Check forbidden words
alt Contains forbidden word
SF->>User: Show warning
SF->>SF: Add drool emote
SF->>SF: Check streamer admins
alt Streamer admin active
SF->>Admin: Send clickable alert
else No streamer admin
SF->>Admin: Send plain alert
end
end
Class diagram for speech filter elementclassDiagram
class SpeechFilter {
+can_bypass_filter(mob_to_check)
+get_speech_filter_bypass_ckeys()
+check_streamer_active_admins()
+ckey_list(list_to_ckey)
+get_brainrot_filter_regex()
+Topic(href, href_list)
-brainrot_regex
-speech_filter_bypass_ckeys
}
note for SpeechFilter "Modified regex pattern generation
and admin bypass handling"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
![:shipit: :shipit:](https://github.githubassets.com/images/icons/emoji/shipit.png)
This PR has been inactive for long enough to be automatically marked as stale. This means it is at risk of being auto closed in ~ 7 days, please address any outstanding review items and ensure your PR is finished, if these are all true and you are auto-staled anyway, you need to actively ask maintainers if your PR will be merged. Once you have done any of the previous actions then you should request a maintainer remove the stale label on your PR, to reset the stale timer. If you feel no maintainer will respond in that time, you may wish to close this PR youself, while you seek maintainer comment, as you will then be able to reopen the PR yourself |
![:shipit: :shipit:](https://github.githubassets.com/images/icons/emoji/shipit.png)
Что этот PR делает
Скрывает нарушающее сообщение в уведомлении для админов за алертом, если есть активный админ из банды
Почему это хорошо для игры
Скрывает запрещенные слова в уведомлении, если они там сейчас неуместны
Тестирование
Локальные тесты
Changelog
🆑
code_imp: Улучшен код фильтра речи
/:cl:
Summary by Sourcery
Hide the filtered message from admin logs unless an admin with the
SPEECH_FILTER_BYPASS
ckey is present. Make the filter regex more robust to avoid accidental bypasses.Bug Fixes:
Enhancements: