Bad words script don't work
 

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 words script don't work

Started by Janhouse, 25 April, 2004, 14:11:16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Janhouse

I am using bad words script.

Quotebotname = "LV"
trigs = { ["fuck"]=1,["asshole"]=2,["pipele"]=3,
["mauka"]=4,["suka"]=5,["lohs"]=6,
["Spamer Willa"]=7,["pidars"]=8,["asshole"]=9,
["no-ip.org"]=10,["no-ip.net"]=11,["valsts.lv"]=12,
["no-ip.com"]=12,["v a l s t s . l v"]=13,[". l v"]=14,
[". c o m"]=15,[".  l  v"]=16,[".  c  o  m"]=17,["maukas"]=18,
["rezeknehub.valsts.lv"]=19,["r e z e k n e h u b . v a l s t s . l v"]=20
}
function Main()
frmHub:RegBot(botname)
end

function DataArrival(user, data)
if (not user.bOperator) then
if (( strsub(data, 1, 1) == "<" ) or ( strsub(data, 1, 4) == "$To:" )) then
for key,a in trigs do
if( strfind( strlower(data), key) ) then
SendToAll( botname, user.sName.." is kicked because of using denied words." )
user:Disconnect()
end
end
end
end
end

But it is not worging if I am using robocop. Can somebody fix this?

nErBoS

Hi,

Try this one..

botname = "LV" 

trigs = { 
	"fuck",
	"asshole",
	"pipele", 
	"mauka",
	"suka",
	"lohs", 
	"Spamer Willa",
	"pidars",
	"asshole", 
	"no-ip.org",
	"no-ip.net",
	"valsts.lv", 
	"no-ip.com",
	"v a l s t s . l v",
	". l v", 
	". c o m",
	". l v",
	". c o m",
	"maukas", 
	"rezeknehub.valsts.lv",
	"r e z e k n e h u b . v a l s t s . l v" 
} 

function Main() 
	frmHub:RegBot(botname) 
end 

function DataArrival(user, data) 
	if (not user.bOperator) then 
		if (( strsub(data, 1, 1) == "<" ) or ( strsub(data, 1, 4) == "$To:" )) then 
			for i=1, getn(trigs) do 
				if( strfind( strlower(data), trigs[i]) ) then 
					SendToAll( botname, user.sName.." is kicked because of using denied words." ) 
					user:Disconnect() 
				end 
			end 
		end 
	end 
end

Best regards, nErBoS
--## nErBoS Spot ##--

DarkManX

#2
Hi! Try this:

--By NeRboS
botname = "BoT" 
trigs = {"word1","word2","word3"} 

function DataArrival(user, data) 
   if (not user.bOperator) then 
      if ((strsub(data, 1, 1) == "<") or (strsub(data, 1, 4) == "$To:")) then 
         for i=1,getn(trigs) do 
            if(strfind( strlower(data), trigs[i])) then 
            local word = strlower(data), trigs[i]
               SendToAll(botname, "Bad word from "..user.sName..". Disconnected...") 
               user:SendData(botname, "U r disconnected for bad word's.") 
               SendPmToOps(botname, "Bad words: "..user.sName..".") 
               SendPmToOps(botname, "IP "..user.sIP..".") 
               SendPmToOps(botname, "Msg: "..word) 
               user:Disconnect() 
               --user:TempBan() 
               break 
            end 
         end 
      end 
   end
end

SMF spam blocked by CleanTalk