Dinkleberg's GMod
Simple Slur Blocker - Printable Version

+- Dinkleberg's GMod (https://www.dinklebergsgmod.com/site)
+-- Forum: Prop Hunt (https://www.dinklebergsgmod.com/site/forumdisplay.php?fid=4)
+--- Forum: PH Suggestions & Help (https://www.dinklebergsgmod.com/site/forumdisplay.php?fid=11)
+--- Thread: Simple Slur Blocker (/showthread.php?tid=13725)

Pages: 1 2


Simple Slur Blocker - RussEfarmer - 02-20-2021

Here's a simple script that prevents a message containing anything in that table from getting sent. Drop it in lua/autorun and you're off to the races. If we get the timed mutes/gags addon I wrote installed, it would be very easy to have this automatically mute the player for a few minutes if they send a message that gets blocked, if we wanted to.

https://github.com/RussEfarmer/bad-word-slur-blocker
https://github.com/RussEfarmer/bad-word-slur-blocker/tree/automute

Code:
badwords = {
    "badword1",
    "badword2",
    "badword3",
    "badword4",
    "badword5" -- don't put a comma on the last one
}

function findBadWords(table, text)
    for k,v in pairs(table) do
        if string.find(text, v) then return true end
    end
end

if SERVER then
    hook.Remove("PlayerSay", "nobadword")
    hook.Add( "PlayerSay", "nobadword", function(ply, text)
        if findBadWords(badwords, text) then return "" end
    end)
end



RE: Simple Slur Blocker - Here lies Eggroll's Eggrolls - 02-20-2021

Yes. RIGHT NOW. PLS


RE: Simple Slur Blocker - Deer-ly - 02-20-2021

thank you stress queen, keep slaying


RE: Simple Slur Blocker - ratty - 02-20-2021

big moves


RE: Simple Slur Blocker - RussEfarmer - 02-20-2021

staff are annoying so im replacing them all with crappy lua scripts, everyone get out


RE: Simple Slur Blocker - bryanbrr - 02-20-2021

+1 x 1000000


RE: Simple Slur Blocker - lacer - 02-20-2021

My problem with this is we are on the internet and this is easily avoidable by either yelling out a slur in the voice chat or replacing one letter in the slur itself. With the n word, I've seen the I replaced with an O and an A. It's nearly impossible to block everything.


RE: Simple Slur Blocker - Jammin - 02-20-2021

(02-20-2021, 09:39 AM)derpĀ sucks Wrote: My problem with this is we are on the internet and this is easily avoidable by either yelling out a slur in the voice chat or replacing one letter in the slur itself. With the n word, I've seen the I replaced with an O and an A. It's nearly impossible to block everything.
The vast majority of slurs are done using the actual word though.
We can st least block the actual words and common variations found - obviously staff are still gonna have to have their ears on


RE: Simple Slur Blocker - Battons - 02-20-2021

This is a nice script, have you tested it on a server yet?


RE: Simple Slur Blocker - Mana - 02-20-2021

(02-20-2021, 03:06 AM)RussEfarmer Wrote: staff are annoying so im replacing them all with crappy lua scripts, everyone get out

ASAB!