Download Blocker 100%
 

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 100%

Started by [G-T-E]Gate?, 05 May, 2004, 00:50:31

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

[G-T-E]Gate?

A messege to CHILLER and all users. the script below works great inconjunction with RC7a and 326+330.
Thanks C

Quotefrom Chiller"gate you are my tester it seemd to work but dunno check for yourself."

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

Corayzon

looks good to me, but i think u should add a blocknoprofile option...so when users with no profiles tri to download they are completly blocked =]

nErBoS

Hi,

Maybe i am sleepy here but this "curUser.iProfile == -1" already does that.

Best regards, nErBoS
--## nErBoS Spot ##--

xfiles

Hello m8,

is that script only to prevent users of downloading from OPs!?

Regards

[NL]ZeroX

#4
possible this wil work for blocking download to everyone if a user is not registerd (not tested yet)

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) then 
		curUser:SendData("*** You must get registered to be able to download") 
		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) then 
		curUser:SendData("*** You must get registered to be able to download") 
		return 1 
		end 
	end 
end  

see this page for more info about this download blocker: http://board.univ-angers.fr/thread.php?threadid=249&boardid=12&styleid=1&sid=fe3b919428d6fb78dea2847c24f3b574

//ZeroX

//edit: little bit edit, before a user can download from also users who are unregged

xfiles

Thx m8,

I will test it. I?ll let you know if not. :)

Regards

UwV?

#6
i use this "goodoldscript" ...
wich laso prevents the non regged user from searching in the hub..


--------------------CODE--------------------------------------
--ChatOnlyVar2.lua by Romulus 2003-09-14
--
--Script to prevent searching and downloading from non-registered users
--Tested with PtokaX TD4

botname="-=MembersOnly=-"

AllowSearch=0      -- If you change this value to 1 searches are possible
AllowDownload=0      -- If you change this value to 1 downloads are possible


function Main()
frmHub:EnableFullData(1)
end


function DataArrival(user, data)
data=strsub(data,1,strlen(data)-1)
if user.iProfile==-1 then
   if AllowSearch~=1 then
      if strsub(data,1,7)=="$Search" then
      user:SendData(botname,"You are not allowed to search for files. Only registered users may search!...  .. .. you can  type -> ?reg <- to find out how to do so.")
      return 1 end
   end
   if AllowDownload~=1 then
      if strsub(data,1,12)=="$ConnectToMe" then
      user:SendData(botname,"You are not allowed to download files. Only registered users may download! . .. .so type -> ?reg <- to find out how")
      return 1 end
      if strsub(data,1,15)=="$RevConnectToMe" then
      user:SendData(botname,"You are not allowed to download files. Only registered users may download! .. . ..  type -> ?reg <- and you will see how to .. ")
      return 1 end
   end
end end

--------------------- End of Code -----------------------------


one problem though ..
if the non-regged users gets granted a slot by another user..  he/she can download from them anyway..
 ( the same goes for that script above )
so i also use  .. this little gimmick -- Made by nErBoS


---------------------   CODE     ---------------------

-- Made by nErBoS

sBot = "anti-slotbeg&blablabla-come-to-my-hub-bot"


function DataArrival(user, data)
   if(strsub(data,1,5) == "$To: ") then
      local s,e,who = strfind(data, "$To:%s+(%S+)%s+From:")
      if user.iProfile == -1 then
         if(GetItemByName(who) ~= nil and not GetItemByName(who).bOperator) then
            user:SendPM(sBot, "You are not regged you can only PM OPs... Complaints ?? . . . . Go and blame D.J.Valium!")
            return 1
         end
      end
   end
end

--------------------- End of Code -----------------------------


hope this helps ..

p.s.  please can someone teach me how to do this script thing to keep the Tabs lined out in the post because i see them when i write/paste them in this litlle box here ..  but  they don't show in the post .. :0(  
Music = Love
                              &
                   plop rulez
                          (feed [en]danger[ed][ous] things so they will grow!!)  

F-Lazer

does those scripts even work??.. get syntax errors and nil value warnings when i trie to run them :(  .....

chill

#8

SMF spam blocked by CleanTalk