non-regged - regged users
 

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

non-regged - regged users

Started by blackwings, 02 September, 2004, 11:29:35

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

blackwings

Because someone not even answered my post in my old thread, I made this one.

I wonder if someone could make a download blocker that does this =

Here is how I wanted it to work =
Master = Can dl from everyone
Operators = Can dl from everyone
VIP = Can dl from everyone
REG = Can dl from everyone
Non-REG/Normal user = Can only dl from REG

The previous scripts made by Chilla and Pur doesn't do what I want, therefore I'm asking for someone to make a script that could do it.

Some simple way of doing this is to the script made by Pur = http://board.univ-angers.fr/thread.php?threadid=2562&boardid=11&styleid=1&sid=ef327097533be41e06907c6583f7d198 and make it to check like this =
If a non-regged user tries to dl from a normal reg, then allow, all others people with other profiles should be denied.

another example(simple java example, silly, but it illustrate what I mean)=
if(CurrentUser = Profile-1)
{   
    if(targetUser = profile3)
    {
        i = allowDL;
    }
    else 
    {
        i = blockDL
    }
}


nErBoS

Hi,

Try this...

--## Made by [NL]Pur
--## Change by nErBoS to blackwings needs

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) ~= nil and GetItemByName(towho).iProfile ~= 3) then 
        		curUser:SendData("*** You can only download from reg.")  
	   		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) ~= nil and GetItemByName(towho).iProfile ~= 3) then 
        		curUser:SendData("*** You can only download from reg.")  
	   		return 1
        	end 
	end 
end

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

blackwings

Doesn't work, a unregged  user gets blocked to dl even from normal reg. The message about this even appear when a non regged login to the hub.

Maybe it doesn't work because I test with two clients on my computer.


nErBoS

Hi,

The message will only appear when a UNREG try to download from somebody that isn't UNREG. When you say that is being blocked even from REG users, did the message popup ??

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

blackwings

#4
ehm, sorry, nerbos, my fault. It was a function in another script that was messing things up.

Anyway, it works now almost as I wanted. But I forgot to mention that the non-regged users should also be able to dl from other
non-regged users. In short, non-regged users shall be able to dl from Reg and other non-regged users.


nErBoS

Hi,

Done...

--## Made by [NL]Pur
--## Change by nErBoS to blackwings needs

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) ~= nil and GetItemByName(towho).iProfile ~= 3 and GetItemByName(towho).iProfile ~= -1) then 
        		curUser:SendData("*** You can only download from reg.")  
	   		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) ~= nil and GetItemByName(towho).iProfile ~= 3 and GetItemByName(towho).iProfile ~= -1) then 
        		curUser:SendData("*** You can only download from reg.")  
	   		return 1
        	end 
	end 
end

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

blackwings

#6
I get this errorb message in the script below here, nerbos, can you fix it? =
Syntax error: table index is nil
stack traceback:
   1:  function `DataArrival' at line 34 [file `C:\ptokax\scripts\DLBlocker.lua']
--## Made by [NL]Pur
--## Modded by nErBoS

arrRC = {}

function Main() 
    frmHub:EnableFullData(1) 
end 

function DataArrival(curUser, data) 
	if (strsub(data, 1, 15) == "$RevConnectToMe") then 
		local _,_,towho = strfind(data, "$RevConnectToMe%s+%S+%s+(%S+)|") 
		if (curUser.iProfile == -1 and GetItemByName(towho) ~= nil and GetItemByName(towho).iProfile ~= -1) then 
        		curUser:SendData("*** You can only download from other non-regged users!")
  	   		return 1
        	else 
			arrRC[towho] = 1
		end
	elseif (strsub(data, 1, 12) == "$ConnectToMe" and curUser.iProfile == -1) then 
		local _,_,towho = strfind(data, "$ConnectToMe%s+(%S+)%s+.*|") 
		if (arrRC[curUser.sName] ~= nil) then
			arrRC[curUser.sName] = nil
		elseif (GetItemByName(towho) ~= nil and GetItemByName(towho).iProfile ~= -1) then 
        		curUser:SendData("*** You can only download from other non-regged users!")
	   		return 1
        	end 
	
	end 
end

I don't know if this maybe cause the error, but I recently added this script =
--Description Tag by ??????Hawk?????? 05-07-2004
--Great Idea Hawk ...thx
--Adjust for your profile names if needed
--
--User Settings-------------------------------------------------------------------------------------
--
UnRegTagInDescription = "Not Regged"		--Sets the tag to be shown in Unreg's descriptions
Mins =  "1"				--Sets the time for the tags to be updated

--End User Settings----------------------------------------------------------------------------------
UnReg = {}

function Main() 
	SetTimer(12000) 
	StartTimer()
end 

function NewUserConnected(user, data)
	if (user.iProfile == -1 and UnReg[user.sName] == nil) then
		UnReg[user.sName] = 1
	end
end

function UserDisconnected(user, data)
	if (user.iProfile == -1 and UnReg[user.sName] ~= nil) then
		UnReg[user.sName] = nil
	end
end

function OnTimer()
	SetUnRegTag("UnReg")
end

function SetUnRegTag(User)
	local aux,usr
	for usr, aux in UnReg do
		if (GetItemByName(usr) ~= nil) then
		local profname = "[ "..UnRegTagInDescription.." ] :"
		local userToShow = GetItemByName(usr)
			if (userToShow.sMyInfoString ~= nil) then
				local s,e,name,desc,speed,email,share = strfind(userToShow.sMyInfoString, "$MyINFO $ALL (%S+)%s+([^$]*)$ $([^$]*)$([^$]*)$([^$]+)")
				SendToAll( "$MyINFO $ALL "..name.." "..profname.." "..desc.."$ $"..speed.."$"..email.."$"..share.."$")
			end
		end
	end
end


nErBoS

Hi,

The error could not be from the first script since that script doesn't have the line 34. It couldn't be from the second one because it doesn't have the DataArrival Function. So can you show me what you have in the file "DLBlocker.lua".

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

blackwings

QuoteOriginally posted by nErBoS
Hi,

The error could not be from the first script since that script doesn't have the line 34. It couldn't be from the second one because it doesn't have the DataArrival Function. So can you show me what you have in the file "DLBlocker.lua".

Best regards, nErBoS

why my the one I have is longer is because I have several of these where the one you see in the code =
curUser:SendData("*** You can only download from other non-regged users!")
What line the error points at in my script is this line =
arrRC[towho] = 1


nErBoS

Hi,

So could you show me your script please.

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

blackwings

Here it is =
--## Made by [NL]Pur
--## Modded by nErBoS

sBot = "DLBlocker"

arrRC = {}

function Main() 
    frmHub:EnableFullData(1) 
end 

function DataArrival(curUser, data) 
	if (strsub(data, 1, 15) == "$RevConnectToMe") then 
		local _,_,towho = strfind(data, "$RevConnectToMe%s+%S+%s+(%S+)|") 
		if (curUser.iProfile == -1 and GetItemByName(towho) ~= nil and GetItemByName(towho).iProfile ~= -1) then 
        		curUser:SendData("*** message1")
        		curUser:SendData("*** message2")  
        		curUser:SendData("*** message3")
        		curUser:SendData("*** message4")
        		curUser:SendData("*** message5")
        		curUser:SendData("*** message6")
        		curUser:SendData("*** message7")
        		curUser:SendData("*** message8")
        		curUser:SendPM(sBot, "*** message1")
        		curUser:SendPM(sBot, "*** message2")
			curUser:SendPM(sBot, "*** message3")
			curUser:SendPM(sBot, "*** message4")
			curUser:SendPM(sBot, "*** message5")
        		curUser:SendPM(sBot, "*** message6")
        		curUser:SendPM(sBot, "*** message7")
        		curUser:SendPM(sBot, "*** message8")
	   		return 1
        	else 
			arrRC[towho] = 1
		end
	elseif (strsub(data, 1, 12) == "$ConnectToMe" and curUser.iProfile == -1) then 
		local _,_,towho = strfind(data, "$ConnectToMe%s+(%S+)%s+.*|") 
		if (arrRC[curUser.sName] ~= nil) then
			arrRC[curUser.sName] = nil
		elseif (GetItemByName(towho) ~= nil and GetItemByName(towho).iProfile ~= -1) then 
			curUser:SendData("*** message1")
			curUser:SendData("*** message2")  
			curUser:SendData("*** message3")
			curUser:SendData("*** message4")
			curUser:SendData("*** message5")
			curUser:SendData("*** message6")
			curUser:SendData("*** message7")
			curUser:SendData("*** message8")
			curUser:SendPM(sBot, "*** message1")
			curUser:SendPM(sBot, "*** message2")
			curUser:SendPM(sBot, "*** message3")
			curUser:SendPM(sBot, "*** message4")
			curUser:SendPM(sBot, "*** message5")
			curUser:SendPM(sBot, "*** message6")
			curUser:SendPM(sBot, "*** message7")
        		curUser:SendPM(sBot, "*** message8")
	   		return 1
        	end 
	
	end 
end


nErBoS

Hi,

Try out this one...

--## Made by [NL]Pur
--## Modded by nErBoS

sBot = "DLBlocker"

arrRC = {}

function Main() 
    frmHub:EnableFullData(1) 
end 

function DataArrival(curUser, data) 
	if (strsub(data, 1, 15) == "$RevConnectToMe") then 
		local _,_,towho = strfind(data, "$RevConnectToMe%s+%S+%s+(%S+)|") 
		if (curUser.iProfile == -1 and GetItemByName(towho) ~= nil and GetItemByName(towho).iProfile ~= -1) then 
        		curUser:SendData("*** message1")
        		curUser:SendData("*** message2")  
        		curUser:SendData("*** message3")
        		curUser:SendData("*** message4")
        		curUser:SendData("*** message5")
        		curUser:SendData("*** message6")
        		curUser:SendData("*** message7")
        		curUser:SendData("*** message8")
        		curUser:SendPM(sBot, "*** message1")
        		curUser:SendPM(sBot, "*** message2")
			curUser:SendPM(sBot, "*** message3")
			curUser:SendPM(sBot, "*** message4")
			curUser:SendPM(sBot, "*** message5")
        		curUser:SendPM(sBot, "*** message6")
        		curUser:SendPM(sBot, "*** message7")
        		curUser:SendPM(sBot, "*** message8")
	   		return 1
        	elseif (towho ~= nil) then 
			arrRC[towho] = 1
		end
	elseif (strsub(data, 1, 12) == "$ConnectToMe" and curUser.iProfile == -1) then 
		local _,_,towho = strfind(data, "$ConnectToMe%s+(%S+)%s+.*|") 
		if (arrRC[curUser.sName] ~= nil) then
			arrRC[curUser.sName] = nil
		elseif (GetItemByName(towho) ~= nil and GetItemByName(towho).iProfile ~= -1) then 
			curUser:SendData("*** message1")
			curUser:SendData("*** message2")  
			curUser:SendData("*** message3")
			curUser:SendData("*** message4")
			curUser:SendData("*** message5")
			curUser:SendData("*** message6")
			curUser:SendData("*** message7")
			curUser:SendData("*** message8")
			curUser:SendPM(sBot, "*** message1")
			curUser:SendPM(sBot, "*** message2")
			curUser:SendPM(sBot, "*** message3")
			curUser:SendPM(sBot, "*** message4")
			curUser:SendPM(sBot, "*** message5")
			curUser:SendPM(sBot, "*** message6")
			curUser:SendPM(sBot, "*** message7")
        		curUser:SendPM(sBot, "*** message8")
	   		return 1
        	end 
	
	end 
end

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

BeeR

Hello :)

I'm searching for a bot that blocks non-regged from dload and search in the hub with a mess like  this
"You must be a regged user before you can search and download in this hub"
A cold BeeR is stunning !!

blackwings

#13
QuoteOriginally posted by BeeR
Hello :)

I'm searching for a bot that blocks non-regged from dload and search in the hub with a mess like  this
"You must be a regged user before you can search and download in this hub"
If you want non-regged users to be totally blocked from downloading and to search,
then I recommend this script then(I think that the newest one is inside the rar file)  = http://www.plop.nl/ptokaxbots/Samplerman.php


SMF spam blocked by CleanTalk