Can some1 help me with this script?...i'm new with this stuff :P
BadFiles = {
["childsex"]=1,
["childporn"]=2,
["underage"]=3,
["animalsex"]=4,
["preteen"]=5,
["r@ygold"]=6,
["lolita"]=7,
["rape"]=8,
["incest"]=9,
["beastiality"]=10,
["rape"]=11,
}
function DataArrival(tUser, sData)
if tUser.bOperator == nil then
if string.sub(sData, 1, 12) == "$Search Hub:" then
local _,_, sSearch = string.find(sData, "$Search Hub:%S+%s+%a%?%a%?%d+%?%d+%?(.*)|")
for key,a in BadFiles do
if( string.find( string.lower(sSearch), key) ) then
SendPmToOps(frmHub:GetOpChatName(), "\r\n\r\nThis user is searching for Bad files Please check their share:-\r\n\r\nUsername:-\t"..tUser.sName.."\r\n\IP:-\t\t" .. tUser.sIP .. "\r\nSearched for:-\t"..key.."\r\nTotalkey:- \t".. sSearch .."\r\n\r\n" )
end
end
elseif string.sub(sData, 1, 7) == "$Search" then
local _,_, sSearch = string.find(sData, "%$Search %d+%.%d+%.%d+%.%d+:%d+%s+%a%?%a%?%d+%?%d+%?(.*)|")
for key,a in BadFiles do
if( string.find( string.lower(sSearch), key) ) then
SendPmToOps(frmHub:GetOpChatName(), "\r\n\r\nThis user is searching for Bad files Please check their share:-\r\n\r\nUsername:-\t"..tUser.sName.."\r\n\IP:-\t\t" .. tUser.sIP .. "\r\nSearched for:-\t"..key.."\r\nTotalkey:- \t".. sSearch .."\r\n\r\n" )
end
end
end
end
end
I don't know what i did wrong...but i think i'm overdoin' some things...
Try this:
BadFiles = {
["childsex"]=1,
["childporn"]=2,
["underage"]=3,
["animalsex"]=4,
["preteen"]=5,
["r@ygold"]=6,
["lolita"]=7,
["rape"]=8,
["incest"]=9,
["beastiality"]=10,
["rape"]=11,
}
function SearchArrival (tUser, sData)
if tUser.bOperator == nil then
if string.sub(sData, 1, 12) == "$Search Hub:" then
local _,_, sSearch = string.find(sData, "$Search Hub:%S+%s+%a%?%a%?%d+%?%d+%?(.*)|")
for key,a in BadFiles do
if( string.find( string.lower(sSearch), key) ) then
SendPmToOps(frmHub:GetOpChatName(), "\r\n\r\nThis user is searching for Bad files Please check their share:-\r\n\r\nUsername:-\t"..tUser.sName.."\r\n\IP:-\t\t" .. tUser.sIP .. "\r\nSearched for:-\t"..key.."\r\nTotalkey:- \t".. sSearch .."\r\n\r\n" )
end
end
elseif string.sub(sData, 1, 7) == "$Search" then
local _,_, sSearch = string.find(sData, "%$Search %d+%.%d+%.%d+%.%d+:%d+%s+%a%?%a%?%d+%?%d+%?(.*)|")
for key,a in BadFiles do
if( string.find( string.lower(sSearch), key) ) then
SendPmToOps(frmHub:GetOpChatName(), "\r\n\r\nThis user is searching for Bad files Please check their share:-\r\n\r\nUsername:-\t"..tUser.sName.."\r\n\IP:-\t\t" .. tUser.sIP .. "\r\nSearched for:-\t"..key.."\r\nTotalkey:- \t".. sSearch .."\r\n\r\n" )
end
end
end
end
end
Best regards,
jiten
tnx to jiten....i think i was to tired to see that mistake :rolleyes:
it works great now :D
yw :]
I tryed ..on request of TTB to exclude the TTH search but
it's something i can't get fixed is it possible at all, because Tiger Tree Hashing files are client related ?(
some TTH strings looks like this
TTH:WSHJKUTRAPELLPWMAXZ
it's about the RAPE thingy that's the bug :P