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?
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
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