AntiLeecherBlocker
 

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

AntiLeecherBlocker

Started by 6Marilyn6Manson6, 23 March, 2006, 20:14:57

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

6Marilyn6Manson6

--// Small script AntiLeecherBlocker made by 6Marilyn6Manson6 23/03/2006
--// Change version command by 6Marilyn6Manson6 21/04/2006
--// Added DoShareUnits function by 6Marilyn6Manson6 28/04/2006
--// Change small by 6Marilyn6Manson6 28/04/2006
--// Fixed small error by 6Marilyn6Manson6 28/04/2006
BotName = "[ITA]Annihilator"			--frmHub:GetHubBotName(),
Version = "0.1"
Prefix = "!"							--! + # ? -
------------------------------------------------------
BlockProfiles={
[0]=1,  -- Profile #0 (Registered)
[1]=1,  -- Profile #1 (VIP)
[2]=0,  -- Profile #2 (Operator)
[3]=0,  -- Profile #3 (Moderator)
[4]=0,  -- Profile #4 (Master)
[5]=0,  -- Profile #5 (Netfounder)
[-1]=1, -- Profile #-1 (Unregistered)
}
------------------------------------------------------
tImmune = {
["6Marilyn6Manson6"] = 1,
["[ITA]6Marilyn6Manson6"] = 1,
}
------------------------------------------------------
KiB = 1024
MiB = 1024*1024
GiB = 1024*1024*1024
TiB = 1024*1024*1024*1024
------------------------------------------------------
------------------------------------------------------
ActiveMinShare = 400*GiB
PassiveMinShare = 800*GiB
MaxHubs = 20
MaxSlots = 20
MaxNormalHubs = 10
MaxRegHubs = 10
------------------------------------------------------
Main = function()
	if BotName ~= frmHub:GetHubBotName() then
		frmHub:RegBot(BotName, 1, "AntiLeecherBlocker "..Version.."", "")
	end
end
------------------------------------------------------
ChatArrival = function(usr,data)
	data=string.sub(data,1,string.len(data)-1)
	s,e,cmd = string.find(data, "%b<>%s+(%S+)")
	if usr.bOperator then
		if (string.lower(cmd) == Prefix.."version") then
			SendToOps(BotName,"This Script Is: AntiLeecherBlocker "..Version.." written by 6Marilyn6Manson6")
			return 1
		end
	end
end
------------------------------------------------------
DoShareUnits = function(intSize)
	if intSize ~= 0 then
		local tUnits = { "Bytes", "KiB", "MiB", "GiB", "TiB" }
		intSize = tonumber(intSize);
		local sUnits;
		for index = 1, table.getn(tUnits) do
			if(intSize < 1024) then sUnits = tUnits[index]; break; else intSize = intSize / 1024; end
		end
		return string.format("%0.3f %s",intSize, sUnits);
	else
		return "0 Bytes"
	end
end
------------------------------------------------------
ConnectToMeArrival = function(usr,data)
	if not tImmune[usr.sName] then
		if BlockProfiles[usr.iProfile] == 1 then
			if usr.bActive and usr.iShareSize < ActiveMinShare then
				return usr:SendPM(BotName,"*** Attention! You Not Are Good For Download Here ;). You are in Active mode and you Have: "..DoShareUnits(usr.iShareSize)..", minimum is: "..DoShareUnits(ActiveMinShare)..". Check It Please ;)"),1
		elseif not usr.bActive and usr.iShareSize < PassiveMinShare then
				return usr:SendPM(BotName,"*** Attention! You Not Are Good For Download Here ;). You are in Passive mode and you Have: "..DoShareUnits(usr.iShareSize)..", minimum is: "..DoShareUnits(PassiveMinShare)..". Check It Please ;)"),1
		elseif usr.iHubs > MaxHubs then
				return usr:SendPM(BotName,"*** Attention! You Not Are Good For Download Here ;). You Have: "..usr.iHubs.." OPen HuBs, maximum is: "..MaxHubs.." .Check It Please ;)"),1
		elseif usr.iSlots > MaxSlots then
				return usr:SendPM(BotName,"*** Attention! You Not Are Good For Download Here ;). You Have: "..usr.iSlots.." OPen Slots, maximum is: "..MaxSlots.." .Check It Please ;)"),1
		elseif usr.iNormalHubs > MaxNormalHubs then
				return usr:SendPM(BotName,"*** Attention! You Not Are Good For Download Here ;). You Have: "..usr.iNormalHubs.." OPen Normal HuBs, maximum is: "..MaxNormalHubs.." .Check It Please ;)"),1
		elseif usr.iRegHubs > MaxRegHubs then
				return usr:SendPM(BotName,"*** Attention! You Not Are Good For Download Here ;). You Have: "..usr.iRegHubs.." OPen Registered/Vip HuBs, maximum is: "..MaxRegHubs.." .Check It Please ;)"),1
			end	
		end
	end
end

SearchArrival = function(usr,data)
	if not tImmune[usr.sName] then
		if BlockProfiles[usr.iProfile] == 1 then
			if usr.bActive and usr.iShareSize < ActiveMinShare then
				return usr:SendPM(BotName,"*** Attention! You Not Are Good For Search Here ;). You are in Active mode and you Have: "..DoShareUnits(usr.iShareSize)..", minimum for use Search is: "..DoShareUnits(ActiveMinShare)..". Check It Please ;)"),1
		elseif not usr.bActive and usr.iShareSize < PassiveMinShare then
				return usr:SendPM(BotName,"*** Attention! You Not Are Good For Search Here ;). You are in Passive mode and you Have: "..DoShareUnits(usr.iShareSize)..", minimum for use Search is: "..DoShareUnits(PassiveMinShare)..". Check It Please ;)"),1
			end
		end
	end
end
------------------------------------------------------
RevConnectToMeArrival = ConnectToMeArrival
MultiConnectToMeArrival = ConnectToMeArrival
--// 6Marilyn6Manson6

6Marilyn6Manson6

First post update with most change :)

Alexinno

nice script 6Marilyn6Manson6

6Marilyn6Manson6

#3
Quote from: Alexinno on 16 June, 2006, 07:33:57
nice script 6Marilyn6Manson6

Thank you. Im back yesterday from Milan and today I work for other important update ;). Last versione is 1.22 and you can download it from this thread:

http://forum.ptokax.org/index.php?topic=6050.0

C ya ;)

SMF spam blocked by CleanTalk