PtokaX forum

Archive => HOW-TO's => Archived 5.1 boards => Old HOW-TO's => Topic started by: HappyTheMan on 31 August, 2006, 22:43:38

Title: How to get "search is disabled.txt" in search results ?
Post by: HappyTheMan on 31 August, 2006, 22:43:38
Hi everyone!
Does anyone knows how to send a "search is disabled.txt" in search results for one profile?
NB: I already know how to disable searches :-)
Title: Re: How to get "search is disabled.txt" in search results ?
Post by: GeceBekcisi on 05 September, 2006, 16:46:36
Hey folks.. I've been and will be away from DC/LUA for some (more) time but when I visit the board I'll try to be helpful as much as I can if I have time..

And for your question HappyTheMan, there's a sample from one of my scripts below. If you can edit it to fit your needs you're free; otherwise I believe there're lots of people who can mod it for you..

Good luck..

function SearchArrival(curUser, Data)
if iBlockSearch then
if ((curUser.iShareSize < iShareLimit*iUnitSize) or (curUser.iSlots < iSlotsLimit)) and tDisabledProfiles[curUser.iProfile] == 1 then
if iWarnOnSearchFrame then
if string.sub(Data, 9, 12) == "Hub:" then -- Passive Searches
local _,_,  sSearch = string.find(Data, "$Search Hub:%S+%s+%a%?%a%?%d+%?%d+%?(.*)|")
if sSearch then
if string.sub(sSearch, 1, 4) == "TTH:" then
curUser:SendData("$SR "..frmHub:GetHubSecAliasName().." Restrictions\\Search\\Search dropped. Type !why to main chat for more info"..string.char(5).."0 0/0"..string.char(5)..""..sSearch.." ("..frmHub:GetHubIp()..":"..frmHub:GetHubPort()..")")
else
curUser:SendData("$SR "..frmHub:GetHubSecAliasName().." Restrictions\\Search\\"..sSearch.."\\Search dropped. Type !why to main chat for more info"..string.char(5).."0 0/0"..string.char(5).."TTH:LEECHERBLOCKERSCRIPTBYGECEBEKCISI234567 ("..frmHub:GetHubIp()..":"..frmHub:GetHubPort()..")")
end
end
else
local _,_, sSearch = string.find(Data, "%$Search %d+%.%d+%.%d+%.%d+:%d+%s+%a%?%a%?%d+%?%d+%?(.*)|")
if sSearch then
if string.sub(sSearch, 1, 4) == "TTH:" then
curUser:SendData("$SR "..frmHub:GetHubSecAliasName().." Restrictions\\Search\\Search dropped. Type !why to main chat for more info"..string.char(5).."0 0/0"..string.char(5)..""..sSearch.." ("..frmHub:GetHubIp()..":"..frmHub:GetHubPort()..")")
else
curUser:SendData("$SR "..frmHub:GetHubSecAliasName().." Restrictions\\Search\\"..sSearch.."\\Search dropped. Type !why to main chat for more info"..string.char(5).."0 0/0"..string.char(5).."TTH:LEECHERBLOCKERSCRIPTBYGECEBEKCISI234567 ("..frmHub:GetHubIp()..":"..frmHub:GetHubPort()..")")
end
end
end
end
if iWarnOnMainChat then
curUser:SendData(sBot,"Search dropped. Type !why here for more info")
end
return 1
end
end
end
Title: Re: How to get "search is disabled.txt" in search results ?
Post by: HappyTheMan on 07 September, 2006, 08:19:39
Wow thanks to you both! Especially Mutor cause the script is exactly what I needed. Maybe you should just remove the little comma at the end of the Profile table (I get an error here).
Thx again for your kindness
Best regards
HappyTheMan