imayushsaini / Bombsquad-Ballistica-Modded-Server

Modded Server scripts for game BombSquad
MIT License
54 stars 52 forks source link

Update profanity.py #92

Closed gobloggerid closed 2 days ago

gobloggerid commented 6 months ago

A much simpler yet more powerful method for censoring inappropriate words from messages compared to the previous one.

gobloggerid commented 6 months ago

Yes I mean they're packages (better-profanity and unidecode). We need to install them first using pip.

On Tue, May 28, 2024, 03:47 Vishal @.***> wrote:

@.**** commented on this pull request.

In dist/ba_root/mods/features/profanity.py https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server/pull/92#discussion_r1616380003 :

  • r"chu+d\w*\b|"
  • "sex+($|)|"
  • r"bo+b(s|z)|"
  • r"po+r+n|"
  • r"ni+p+le+" -) +# Simple yet powerful tools to censor bad words from chat messages +# It doesn't use regex but string comparison, so hopefully it will be faster +# With a built-in long list of profanity words (in English), there’s no need to define it yourself +# You can add your custom words for better coverage +# The censor can be bypassed by adding any character(s) to the words, unfortunately :( +# But hey, at least it can attempt to censor bad words written in fancy letters :) +# Don’t forget to install the unidecode and better-profanity modules +# Brought to you by goblogger
  • +from better_profanity import profanity

it's a package. I guess it should be downloaded to be used.

— Reply to this email directly, view it on GitHub https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server/pull/92#discussion_r1616380003, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEC2NSA7MARUJ6KPSTFS5KDZEOLU5AVCNFSM6AAAAABH5PGGESVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDAOBRGQ2DQMRXGQ . You are receiving this because you authored the thread.Message ID: <imayushsaini/Bombsquad-Ballistica-Modded-Server/pull/92/review/2081448274 @github.com>

imayushsaini commented 1 week ago

Yes I mean they're packages (better-profanity and unidecode). We need to install them first using pip.

Cant we bundle it here only ? in dist/ba_data/python-site-packages ? Folks can face issues setting up a server the first time.