Download Blocker
 

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

Download Blocker

Started by c h i l l a, 24 October, 2003, 12:20:05

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

c h i l l a

This is the smalles download blocker ;), that prevents
Not Registered Users from downloading.

--Download-Blocker-V.1.1

function Main()
	frmHub:EnableFullData(1)
end

function DataArrival(curUser, data)
	if (strsub(data, 1, 1) == "$" and curUser.iProfile==-1 and strfind(data, "ConnectToMe")) then
		return 1
	end
end

only when an active regged client is trying to connect to an Not regged active client then the other client may have a chance of downloading something when a slot is open. But I suppose the other Leechblockers didn't care about that problem either.

RiPOFF

very cool can you add the message
"You are not registered in this hub please register and you may download."

thanks RiP

xokas

howdy there! could ya make an feature that we can define the nick's that can download?it was a nice one to me because in portugal the ips are variable! :( waiting for a reply! tkhx in advance! xokas over&out

[G-T-E]Gate?

Hi all ,
I like the idea bout the ip range.
A little addon question,
Can the script made so that the Profiles Master, Su and SU+ can block NormalUsers when they try to download from them.
What I trying to say is that when a Normaluser tries to download from a Master, Su or SU+ he gets a messege that he first has to become Registered or VIPed.
But all NormalUser can download from other NormalUser and NormalUsers can download from RegUsers and VIPs.
 :rolleyes:

NightLitch

Small and simple... like it...
//NL

c h i l l a

for you RiPOFF

function Main()
	frmHub:EnableFullData(1)
end

function DataArrival(curUser, data)
	if (strsub(data, 1, 1) == "$" and curUser.iProfile==-1 and strfind(data, "ConnectToMe")) then
		curUser:SendData("*** You are not registered in this hub please register and you may download.")
		return 1
	end
end

not hard actually is it ;)?

for xokas just add the nicks you want, not to hard either.

aNicks = {
["Nick1"] = 1,
["Nick2"] = 1,
["Nick3"] = 1,
}


function Main()
	frmHub:EnableFullData(1)
end

function DataArrival(curUser, data)
	if (strsub(data, 1, 1) == "$" and strfind(data, "ConnectToMe") and not aNicks[curUser.sName]) then
		return 1
	end
end

Gate,  I might post it later, if I have time. First I need to check if its possible.  But I guess it is.

c h i l l a

#6
gate you are my tester it seemd to work but dunno check for yourself.

function Main()
	frmHub:EnableFullData(1)
end

function DataArrival(curUser, data)
	if (strsub(data, 1, 15) == "$RevConnectToMe" and curUser.iProfile == -1) then
		local _,_,towho = strfind(data, "$RevConnectToMe%s+%S+%s+(%S+)|")
		if GetItemByName(towho) and GetItemByName(towho).bOperator then
			curUser:SendData("*** You must get registered to be able to download from an OP")
			return 1
		end
	elseif (strsub(data, 1, 12) == "$ConnectToMe" and curUser.iProfile == -1) then
		local _,_,towho = strfind(data, "$ConnectToMe%s+(%S+)%s+.*|")
		if GetItemByName(towho) and GetItemByName(towho).bOperator then
			curUser:SendData("*** You must get registered to be able to download from an OP")
			return 1
		end
	end
end

xokas

hi there!that looks nice chilla but i was thinking on something like this, for example: !forbidden 'nick' , so that i can define it by not opening file.lua and editing it! get my idea?

acrespo

Is it possible to specify a extension allowed to download? For example I need allow to download the user's filelist.


Fire Koboy

I just loaded this:
"
function Main()
   frmHub:EnableFullData(1)
end

function DataArrival(curUser, data)
   if (strsub(data, 1, 1) == "$" and curUser.iProfile==-1 and strfind(data, "ConnectToMe")) then
      curUser:SendData("*** You are not registered in this hub please register and you may download.")
      return 1
   end
end

"
My users are registering to download...but whenever they are registered...they still receive the message :
"
You are not registered in this hub please register and you may download.
"
 in the Main chat...
Is it possible to do something for that cause the message is coming very soon on their screen and that's not really cool for them...

Thanx ...
Burn Baby, Burn...

c h i l l a

sorry...  I have no clue... is it only with newly regged users?..  maby they need to reconnect first...

cause actually curUser.iProfile==-1   is only not regged users.

Fire Koboy

Ok I will precise to reconnect after registering...and tell you if that was the solution...
Good Job Chilla...
Burn Baby, Burn...

Fire Koboy

You were right Chilla....one time again....
And now I would need a !call script...Cause I had one but with robocop it doesn't work anymore..and I found this very usefull....
Do you see what I'talking about....
writing !call in the cc , it sends a pm to the to say him he's waited in the cc....
I guess it already exists but I'm french and not understanding a lot in this forum....lol
Thanx and Thanx and thanx...:)
Burn Baby, Burn...

Jabo

Is it possible to have it where you only have to be registered to download from ops, but not to download from everyone else?

c h i l l a

if i got you right then look 8 posts upwards :).

Jabo

Yep thats it.....it may help if I learn to read things more carefully...lol.  Hoping it works, gate never posted back if it ran ok for him, but I will give it a try.  Thnx for the help Chilla.

Jabo

#17
Just tried out the script and got:

Syntax Error: expected;
  last token read: `function' at line 3 in file `...


Nevermind...lol.....fixed it

Jabo

hmmm......strange thing happening.....some of the reg users are saying that when they log in it shows the hub as being empty......why?

c h i l l a

might depend on what you have changed in the code.
just post your code and we'll see.

Jabo

I haven't changed anything to the code.....I put it in as you wrote it above.

code:--------------------------------------------------------------------------------

function Main()
   frmHub:EnableFullData(1)
end

function DataArrival(curUser, data)
   if (strsub(data, 1, 15) == "$RevConnectToMe" and curUser.iProfile == -1) then
      local _,_,towho = strfind(data, "$RevConnectToMe%s+%S+%s+(%S+)|")
      if GetItemByName(towho) and GetItemByName(towho).bOperator then
         curUser:SendData("*** You must get registered to be able to download from an OP")
         return 1
      end
   elseif (strsub(data, 1, 12) == "$ConnectToMe" and curUser.iProfile == -1) then
      local _,_,towho = strfind(data, "$ConnectToMe%s+(%S+)%s+.*|")
      if GetItemByName(towho) and GetItemByName(towho).bOperator then
         curUser:SendData("*** You must get registered to be able to download from an OP")
         return 1
      end
   end
end
--------------------------------------------------------------------------------

c h i l l a

QuoteJust tried out the script and got:

Syntax Error: expected;
last token read: `function' at line 3 in file `...


Nevermind...lol.....fixed it


thats why I wondered...
but I guess. then its not the script might be something else...
maybe someone else knows why.

Jabo

it must have been just a one time thing, cause no one else that has registered has complained or said anything about it......oh well, maybe the user himself messed up...lol.  anyways, thanks for the script chilla.

c h i l l a

#23
--Download-Blocker-V.1.1-NP

NickPrefix = "[TMX]"

function Main()
	frmHub:EnableFullData(1)
end

function DataArrival(curUser, data)
	if (strsub(data, 1, 1) == "$" and strsub(curUser.sName,1,strlen(NickPrefix)) ~= NickPrefix and strfind(data, "ConnectToMe")) then
		return 1
	end
end

sajy2k

thank you very much man, i have search for this script for long time

SMF spam blocked by CleanTalk