bad word checker
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

bad word checker

Started by AL?MCi, 27 April, 2007, 00:58:08

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AL?MCi

I take the script in another topic and modified it but i have problem,

For example;
if a user uses "fuck" or "aafuck" or "fuckaa" he is disconnected. How is he disconnected only using "fuck"


sBot = frmHub:GetHubBotName() 
trigs = { ["fuck"]=1,["coaie"]=2,["suck"]=3,["sucks"]=4,["suckz"]=5,["blow"]=6,["fucker"]=7, 

} 

function ChatArrival (user, data) 
data=string.sub(data,1,string.len(data)-1) 
	local s,e,msg = string.find(data, "%b<>(.+)")
	if (not user.bOperator) then 
	for key,a in pairs(trigs) do 
		
		if(string.find( string.lower(msg), "[%s%.%,%-%_]?" .. key .. "[%s%.%,%-%_%|]?")) then 
		SendPmToOps(sBot," "..user.sName.." Try to sent this message in Main----> "..data)
		user:Disconnect() 
		return 1 
			end 
		end 
	end 
end
Nothing Can Be Everything...

AL?MCi


Now it is workin, Thx Mutor...
Nothing Can Be Everything...

jack_port1000

hi, if some one use this word bot disconnect them i want just bot changeword to "Sorry" not disconnect to user in this script


-- Set BotName
sBot = frmHub:GetHubBotName()
HubOwner = "Psycho_Chihuahua"
CheckProfiles = {
	[0] = 1,    -- =[Master]=
	[1] = 1,    -- =[OP]=
	[2] = 1,    -- =[ViP]=
	[3] = 1,    -- =[Reg]=
	[4] = 1,    -- =[Custom Profile 1]=
	[5] = 1,    -- =[Custom Profile 2]=
	[-1] = 1,   	-- =[UnReg]=
}


local trigs = {"fuck","coaie","suck","sucks","suckz","blow","fucker","chutiya",
"madarchod","chodu","bhadva","bhadve","chut","lund","lavde","lavdu","bhenchod","madarchot","madar",
"rand","randi","chod","chinal","gand","jatu","lundfakir","lavda","bastard","maderchod","lodu","bhosda","landus","bhadwa","harami","motherfucker",} 

function Main ()
	string.gmatch = (string.gmatch or string.gfind); 
end

function ChatArrival (user, data)
	if CheckProfiles[user.iProfile] == 1 then
		local s,e,msg = string.find(string.lower(data), "^%b<> (.+)|$")
		for word in string.gmatch(msg,"(%S+)") do
			for key,val in ipairs(trigs) do
				if word == string.lower(val) then
					return SendPmToOps(sBot," "..user.sName.." Try to sent "..
					"this message in Main----> "..data),user:SendData(sBot,user.sName..", "..
					"please don't use words like "..word.." in this hub order by AnnA  Reconnect to hub."),user:Disconnect(),1
				end 
			end
		end
	end 
end



Thor

If you want to change a word into a sentence, use wordreplacer. If you want to filter the main and private chat, use forbidden scripts, there are several one.

jack_port1000



can you give me link for word replacer but it must work for caps also i find in all forums but not get it

Psycho_Chihuahua

PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

jack_port1000

Thanks a lot both of u script work very nice tanks again

SMF spam blocked by CleanTalk