Skip to content

Conversation

@emyfops
Copy link
Collaborator

@emyfops emyfops commented Dec 21, 2025

AntiSpam module to filter, remove or ignore certain categories of words. In the near future it will also filter out regular spam using possible a bucket token approach.

@emyfops emyfops marked this pull request as draft December 21, 2025 00:22
@Avanatiker
Copy link
Member

It would be nice if we could decode the hard coded slurs into base64

@emyfops
Copy link
Collaborator Author

emyfops commented Dec 21, 2025

It would be nice if we could decode the hard coded slurs into base64

Why ?

@Avanatiker
Copy link
Member

It may trigger some code inspections and mark our repo as dangerous or some shit. also it broke AI suggestions didnt it xD

@emyfops
Copy link
Collaborator Author

emyfops commented Dec 21, 2025

idk github ai works

This comment was marked as spam.

@emyfops
Copy link
Collaborator Author

emyfops commented Dec 21, 2025

ok clanker

@Avanatiker
Copy link
Member

It actually brings some good points

@kittenvr
Copy link

clanker got marked as spam

val hex = sequenceOf("\\s([A-Fa-f0-9]+){5,10}$").map { Regex(it) }
val colors = sequenceOf(">", "`").map { Regex(it) }

val fancyToAscii = mapOf('ᴀ' to 'a', 'ʙ' to 'b', 'c' to 'c', 'ᴅ' to 'd', 'ᴇ' to 'e', 'ꜰ' to 'f', 'ɢ' to 'g', 'ʜ' to 'h', 'ɪ' to 'i', 'ᴊ' to 'j', 'ᴋ' to 'k', 'ʟ' to 'l', 'ᴍ' to 'm', 'ɴ' to 'n', 'ᴏ' to 'o', 'ᴩ' to 'p', 'q' to 'q', 'ʀ' to 'r', 'ꜱ' to 's', 'ᴛ' to 't', 'ᴜ' to 'u', 'ᴠ' to 'v', 'ᴡ' to 'w', 'x' to 'x', 'y' to 'y', 'ᴢ' to 'z',)
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe make cyrillicToAscii to prevent bypassing those filters by replacing latin A with cyrillic А

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

maybe make cyrillicToAscii to prevent bypassing those filters by replacing latin A with cyrillic А

It will cause russian messages to be incorrectly converted

Copy link
Contributor

Choose a reason for hiding this comment

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

theres no filters for russian language anyway or wdym

@emyfops emyfops marked this pull request as ready for review December 21, 2025 23:52
@emyfops
Copy link
Collaborator Author

emyfops commented Dec 22, 2025

@Avanatiker @beanbag44 need review asap so I can continue adding features

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants