Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

feat: use censor to cure names with slurs #65

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

feat: use censor to cure names with slurs #65

wants to merge 10 commits into from

Conversation

Ushie
Copy link
Member

@Ushie Ushie commented Apr 11, 2023

No description provided.

Copy link
Member

@oSumAtrIX oSumAtrIX left a comment

Choose a reason for hiding this comment

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

If this PR is not complete yet, mark it as a draft.

src/utils/decancer.rs Outdated Show resolved Hide resolved
src/utils/decancer.rs Outdated Show resolved Hide resolved
@Ushie
Copy link
Member Author

Ushie commented Apr 12, 2023

If this PR is not complete yet, mark it as a draft.

It is complete

Copy link

@badawoll badawoll left a comment

Choose a reason for hiding this comment

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

IMO the word ass should be excluded from the list, as it filters benign words such as pass and class, which, given the context of the server, are to be expected in nicknames/usernames.

@Ushie Ushie requested a review from oSumAtrIX April 18, 2023 16:44
@Ushie
Copy link
Member Author

Ushie commented Apr 18, 2023

IMO the word ass should be excluded from the list, as it filters benign words such as pass and class, which, given the context of the server, are to be expected in nicknames/usernames.

I dont believe words like that will be effected, but I'm all for excluding ass

@Ushie
Copy link
Member Author

Ushie commented May 11, 2023

@oSumAtrIX can you review?

@badawoll
Copy link

IMO the word ass should be excluded from the list, as it filters benign words such as pass and class, which, given the context of the server, are to be expected in nicknames/usernames.

I dont believe words like that will be effected, but I'm all for excluding ass

use censor::*;

fn main() {
    let censor = Censor::Standard;
    println!("{}", censor.check("passport"));
}

from my testing, this code returns true. But anyway, such edge-cases are limited pretty much just to the word ass, I've done some grepping through dictionaries and couldn't find a similar case for other blacklisted words.

src/utils/decancer.rs Outdated Show resolved Hide resolved
src/utils/decancer.rs Outdated Show resolved Hide resolved
@Ushie Ushie force-pushed the feat/censor branch 3 times, most recently from 3395c32 to 2a24fe5 Compare May 14, 2023 22:44
@oSumAtrIX
Copy link
Member

@Ushie Please check if everything works correctly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants