How to get "search is disabled.txt" in search results ?
 

How to get "search is disabled.txt" in search results ?

Started by HappyTheMan, 31 August, 2006, 22:43:38

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

HappyTheMan

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 :-)

GeceBekcisi

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
Do you need an advanced user handling script? Download UserBekcisi today (Latest Edit)
Features: User + ISP + GeoIP database, user info + share checking and many more...

HappyTheMan

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

SMF spam blocked by CleanTalk