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
Now it is workin, Thx Mutor...
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
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.
can you give me link for word replacer but it must work for caps also i find in all forums but not get it
using the search function would help so much
http://forum.ptokax.org/index.php?topic=7148#msg68912
Thanks a lot both of u script work very nice tanks again