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

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

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