Jump to content

Problems with bad words identification

Recommended Posts

Hello there,

I have some problem with the script because it identifies some words as bad words and they are not it the list, part of the code is this one:


local BWords = {

local message = string.gsub(table.concat({...}, " "), "#%x%x%x%x%x%x", "")
local name = string.gsub(getPlayerName(player), "#%x%x%x%x%x%x", "")
	for i, data in ipairs(BWords) do
		if string.find(message, data[1]) or pregFind(message,"([0-9]{1,3})[^[:digit:]^[:cntrl:]]{1,3}([0-9]{1,3})[^[:digit:]^[:cntrl:]]{1,3}([0-9]{1,3})[^[:digit:]^[:cntrl:]]{1,3}([0-9]{1,3})") then
    ...rest of the code here...

I only have that bad word, and if I write something like "I will get that pistol" it detects as bad word...

Can you guys help me with it, I don't want it to detect as bad word only because there are 2 letters in one word that match part of the bad words.

I noticed that if I write only "to" it will detect as bad word...

Edited by SuperM
Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...