Download Blocker - Page 3
 

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.

chill

#50
bet this could be written better, got a bit rusty, but lua is just great, so I think this one should work.

--100% Blocker by chill
--only allows connection between same Prefixes e.g. [VIP]nobody may only connect to [VIP]nobody2
--if VIP is added UserPrefix list, by typing "adup VIP"


-- cmd's
-- "adup" -- add/dell userprfx
-- "listup" -- list userprfx

function Main()
	frmHub:EnableFullData(1) 
end

function TrigOnRev(curUser,data)
	return CheckForSamePRFX(curUser,data,"PasCon")
end

function TrigOnCon(curUser,data)
	return CheckForSamePRFX(curUser,data,"ActCon")
end
		
function GetUserPRFX(sname)
	if strsub(sname,1,1) == "[" then
		for i = 2,UserPRFXS.lPRFX do
			if strsub(sname,i,i) == "]" then
				return strsub(sname,2,(i-1))
			end
		end
	end
end

function CheckForSamePRFX(curUser,data,cmode)
	local prfx = GetUserPRFX(curUser.sName)
	if prfx and UserPRFXS.t[prfx] then
		local conNick = ""
		if (cmode == "PasCon") then
			_,_,conNick = strfind(data,"(%S+)|$")
		elsif (cmode == "ActCon") then
			_,_,conNick = strfind(data,"^%$ConnectToMe%s(%S+)")
		end
		conNick = conNick or ""
		local cprfx = GetUserPRFX(conNick)
		if not (cprfx and cprfx == prfx) then
			return "toblock"
		end
	else
		return "toblock"
	end
end

ConnectTriggs = {}
ConnectTriggs["$Rev"] = TrigOnRev
ConnectTriggs["$Con"] = TrigOnCon	


function DataArrival(curUser,data)
	if strsub(data,1,1) == "$" and (not curUser.bOperator) then
		local str1 = strsub(data,1,4)
		if ConnectTriggs[str1] then
			if ConnectTriggs[str1](curUser,data) then
				return 1
			end
		end
	elseif strsub(data,1,1) == "<" and curUser.bOperator then
		data = strsub(data,1,strlen(data)-1)
		local _,_,cmd = strfind(data,"^%b<>%s+(%S+)")
		local _,_,prfx = strfind(data,"^%b<>%s+%S+%s+(%S+)$")
		if cmd and UserPRFXS.f[cmd] then
			curUser:SendData(UserPRFXS.f[cmd](UserPRFXS,prfx))
			return 1
		end
	end
end

UserPRFXS = {}
UserPRFXS.lPRFX = 0
UserPRFXS.t = {}
UserPRFXS.f = {}

function AddDelUserPRFXS(self,prfx)
	prfx = prfx or ""
	str = "-- Prefix "..prfx.." was "
	if self.t[prfx] then
		self.t[prfx] = nil
		str.." delted"
	elseif prfx and (prfx ~= "") then
		self.t[prfx] = 1
		str.." added"
	end
	GetLongestPRFX(self)
end

function GetUserPRFXList(self)
	local str = "-- List of Connections --\r\n"
	for i,v in self.t do
		str = str..i.."\r\n"
	end
	return str
end

function GetLongestPRFX(self)
	self.lPRFX = 0
	for i,_ in self.t do
		local len = strlen(i) + 2
		if (len > self.lPRFX) then
			self.lPRFX == len
		end
	end
end

UserPRFXS.f.adup = AddDelUserPRFXS
UserPRFXS.f.listup = GetUserPRFXList

chill

#51
this one is a bit better I think,

--100% Blocker by chill
--only allows connection between same Prefixes e.g. [VIP]nobody may only connect to [VIP]nobody2
--if VIP is added UserPrefix list, by typing "adup VIP"


-- cmd's
-- "adup" -- add/dell userprfx
-- "listup" -- list userprfx

function Main()
	frmHub:EnableFullData(1) 
end

function TrigOnRev(curUser,data)
	return CheckForSamePRFX(curUser,data,"PasCon")
end

function TrigOnCon(curUser,data)
	return CheckForSamePRFX(curUser,data,"ActCon")
end
		
function GetUserPRFX(sname)
	if strsub(sname,1,1) == "[" then
		for i = 2,UserPRFXS.lPRFX do
			if strsub(sname,i,i) == "]" then
				return strsub(sname,2,(i-1))
			end
		end
	end
end

function CheckForSamePRFX(curUser,data,cmode)
	local prfx = GetUserPRFX(curUser.sName)
	if prfx and UserPRFXS.t[prfx] then
		local conNick = ""
		if (cmode == "PasCon") then
			_,_,conNick = strfind(data,"(%S+)|$")
		elsif (cmode == "ActCon") then
			_,_,conNick = strfind(data,"^%$ConnectToMe%s(%S+)")
		end
		conNick = conNick or ""
		local cprfx = GetUserPRFX(conNick)
		if not (cprfx and cprfx == prfx) then
			return "toblock"
		end
	else
		return "toblock"
	end
end

ConnectTriggs = {}
ConnectTriggs["$Rev"] = TrigOnRev
ConnectTriggs["$Con"] = TrigOnCon	


function DataArrival(curUser,data)
	if strsub(data,1,1) == "$" and (not curUser.bOperator) then
		local str1 = strsub(data,1,4)
		if ConnectTriggs[str1] then
			if ConnectTriggs[str1](curUser,data) then
				return 1
			end
		end
	elseif strsub(data,1,1) == "<" and curUser.bOperator then
		data = strsub(data,1,strlen(data)-1)
		local _,_,cmd = strfind(data,"^%b<>%s+(%S+)")
		local _,_,prfx = strfind(data,"^%b<>%s+%S+%s+(%S+)$")
		if cmd and UserPRFXS.f[cmd] then
			curUser:SendData(UserPRFXS.f[cmd](UserPRFXS,prfx))
			return 1
		end
	end
end

UserPRFXS = {}
UserPRFXS.lPRFX = 0
UserPRFXS.t = {}
UserPRFXS.f = {}

function AddDelUserPRFXS(self,prfx)
	prfx = prfx or ""
	str = "-- Prefix "..prfx.." was "
	if self.t[prfx] then
		self.t[prfx] = nil
		str.." delted"
	elseif prfx and (prfx ~= "") then
		self.t[prfx] = 1
		str.." added"
	end
	GetLongestPRFX(self)
end

function GetUserPRFXList(self)
	local str = "-- List of Connections --\r\n"
	for i,_ in self.t do
		str = str..i.."\r\n"
	end
	return str
end

function GetLongestPRFX(self)
	self.lPRFX = 0
	for i,_ in self.t do
		local len = strlen(i) + 2
		if (len > self.lPRFX) then
			self.lPRFX == len
		end
	end
end

UserPRFXS.f.adup = AddDelUserPRFXS
UserPRFXS.f.listup = GetUserPRFXList

chill

another version of this script, it only should allow connections to people who have equal or lower share than oneself

*edit* onlz works for active users, need to fix it to properly work for passive connections, laters

--100% Blocker by chill
--only allows connection to users who's share is less or equal to one owns share


function Main()
        frmHub:EnableFullData(1)
end

function TrigOnRev(curUser,data)
	return CheckForEorLShare(curUser,data,"PAS")
end

function TrigOnCon(curUser,data)
        return CheckForEorLShare(curUser,data,"ACT")
end

function CheckForEorLShare(connector,data,mode)
	local conNick = ""
	if mode == "ACT" then
		_,_,conNick = strfind(data,"^%$ConnectToMe%s(%S+)")
	elseif mode == "PAS" then
		_,_,conNick = strfind(data,"(%S+)|$")
	end
	if conNick then
		local connected = GetItemByName(conNick)
		local corShare = GetShare(connector.sMyInfoString)
		local cedShare = GetShare(connected.sMyInfoString)
		if not (corShare >= cedShare) then
			return "toblock"
		end
	else
		return "toblock"
	end
end

function GetShare(sMyINFO)
	local _,_,share = strfind(sMyINFO,"%$(%d+)%$|+$")
	share = share or 0
	return share
end

ConnectTriggs = {}
ConnectTriggs["$Rev"] = TrigOnRev
ConnectTriggs["$Con"] = TrigOnCon

function DataArrival(curUser,data)
        if strsub(data,1,1) == "$" and (not curUser.bOperator) then
                local str1 = strsub(data,1,4)
                if ConnectTriggs[str1] then
                        if ConnectTriggs[str1](curUser,data) then
                                return 1
                        end
                end
        end
end

chill

done.
Blocks Connects if your sharesize is lower than the share of the user you are connecting to.
On Passive Connects it adds a table entry whitch will be lookedup when the Active response come, if it doesn't come the entrie will be deleted after a certain amount of time.

--100% Blocker by chill
--only allows connection to users who's share is less or equal to one owns share


function Main()
        frmHub:EnableFullData(1)
	SetTimer(1000)
	StartTimer()
end

function OnTimer()
	for i,v in AConnects.t do
		v = v - 1
		if v <= 0 then
			AConnects.t[i] = nil
		else
			AConnects.t[i] = v
		end
	end
end

function TrigOnRev(curUser,data)
	return CheckForEorLShare(curUser,data,"PAS")
end

function TrigOnCon(curUser,data)
        return CheckForEorLShare(curUser,data,"ACT")
end

function CheckForEorLShare(connector,data,mode)
	local conNick = ""
	if mode == "ACT" then
		_,_,conNick = strfind(data,"^%$ConnectToMe%s(%S+)")
		if conNick then
			local entry = AConnects.t[connector.sName]
			if entry and (entry[1] == conNick) then
				AConnects.t[connector.sName] = nil
				return
			end
		end 
	elseif mode == "PAS" then
		_,_,conNick = strfind(data,"(%S+)|$")
	end
	if conNick then
		local connected = GetItemByName(conNick)
		local corShare = GetShare(connector.sMyInfoString)
		local cedShare = GetShare(connected.sMyInfoString)
		if not (corShare >= cedShare) then
			return "toblock"
		end
	else
		return "toblock"
	end
	if (mode == "PAS") then
		AConnects.t[conNick] = { connector.sName,AConnects.timeout }
	end
end

function GetShare(sMyINFO)
	local _,_,share = strfind(sMyINFO,"%$(%d+)%$|+$")
	share = share or 0
	return share
end

-- Allowed Connects
AConnects = {}
AConnects.t = {}
Aconnects.timeout = 10

ConnectTriggs = {}
ConnectTriggs["$Rev"] = TrigOnRev
ConnectTriggs["$Con"] = TrigOnCon

function DataArrival(curUser,data)
        if strsub(data,1,1) == "$" and (not curUser.bOperator) then
                local str1 = strsub(data,1,4)
                if ConnectTriggs[str1] then
                        if ConnectTriggs[str1](curUser,data) then
                                return 1
                        end
                end
        end
end

chill

this one is quite stable, but it will have some problems with passive operators, but else it runs finest

--DownloadBlocker by Share V 001 by chill
--only allows connection to users who's share is less or equal to one owns share


function Main()
        frmHub:EnableFullData(1)
	SetTimer(1000)
	StartTimer()
end

function OnTimer()
	for i,v in AConnects.t do
		local count = 0
		for i2,v2 in v do
			v2 = v2 - 1
			if v2 <= 0 then
				AConnects.t[i][i2] = nil
			else
				AConnects.t[i][i2] = v2
			end
			count = count + 1
		end
		if count == 0 then
			AConnects.t[i] = nil
		end
	end
end

function TrigOnRev(curUser,data)
	return CheckForEorLShare(curUser,data,"PAS")
end

function TrigOnCon(curUser,data)
        return CheckForEorLShare(curUser,data,"ACT")
end

function CheckForEorLShare(connector,data,mode)
	local conNick = ""
	if mode == "ACT" then
		_,_,conNick = strfind(data,"^%$ConnectToMe%s(%S+)")
		if conNick then
			local entry = AConnects.t[connector.sName]
			if entry and (entry[conNick]) then
				AConnects.t[connector.sName][conNick] = nil
				return
			end
		end 
	elseif mode == "PAS" then
		_,_,conNick = strfind(data,"(%S+)|$")
	end
	if conNick then
		local connected = GetItemByName(conNick)
		if connected then
			local corShare = GetShare(connector.sMyInfoString)
			local cedShare = GetShare(connected.sMyInfoString)
			if (corShare < cedShare) then
				return "toblock",ConvShare((cedShare-corShare)),conNick
			end
		else
			return "toblock"
		end
	else
		return "toblock"
	end
	if (mode == "PAS") then
		AConnects.t[conNick] = AConnects.t[conNick] or {}
		AConnects.t[conNick][connector.sName] = AConnects.timeout
	end
end

function GetShare(sMyINFO)
	local _,_,share = strfind(sMyINFO,"%$(%d+)%$|$")
	share = tonumber(share) or 0
	return share
end

function ConvShare(share)
	local tmes = { "KB","MB","GB","TB","PB" }
	local num = 1024
	for i = getn(tmes),1,-1 do
		local snum = num^i
		if share > snum then
			return format("%4.2f",share/snum).." "..tmes[i]
		end
	end
	return format("%4.2f",share).." B"
end

-- Allowed Connects
AConnects = {}
AConnects.t = {}
AConnects.timeout = 10

ConnectTriggs = {}
ConnectTriggs["$Rev"] = TrigOnRev
ConnectTriggs["$Con"] = TrigOnCon

function DataArrival(curUser,data)
        if strsub(data,1,1) == "$" and (not curUser.bOperator) then
                local str1 = strsub(data,1,4)
                if ConnectTriggs[str1] then
			local ret,diff,nick = ConnectTriggs[str1](curUser,data)
                        if ret then
				if diff then
					curUser:SendData("*** You need "..diff.." more share to download from "..nick)
				end				
                                return 1
                        end
                end
        end
end

chill

this version blocks downloads by share, but only by shareclasses, what is a bit fairer, so people with 0 share can still gte stuff from guys with < 20 Gigshare, and
the one with biggest share can share his stuff wqith all whos share is also big.

so all upper classes can download from lower classes.
lowest class int his exsample is 0-20 GB and uppest is 800-1024 GB and all whos share is a above 1 TB

--DownloadBlocker by Share V 002 by chill
--only allows connection to users who's share is equal or less to your share class

-- SHare Classes in GigaByte
-- e.g. Class 1 = 0-20, Class 2 = 20-40, and from 800 - endless
ShareClasses = { 0,20,40,60,80,100,200,400,600,800,1024 }


function Main()
	ConvertShareClass()
        frmHub:EnableFullData(1)
	SetTimer(1000)
	StartTimer()
end

function ConvertShareClass()
	for i = 1,getn(ShareClasses) do
		ShareClasses[i] = ShareClasses[i] * (1024*1024*1024)
	end
end

function OnTimer()
	for i,v in AConnects.t do
		local count = 0
		for i2,v2 in v do
			v2 = v2 - 1
			if v2 <= 0 then
				AConnects.t[i][i2] = nil
			else
				AConnects.t[i][i2] = v2
			end
			count = count + 1
		end
		if count == 0 then
			AConnects.t[i] = nil
		end
	end
end

function TrigOnRev(curUser,data)
	return CheckForEorLShare(curUser,data,"PAS")
end

function TrigOnCon(curUser,data)
        return CheckForEorLShare(curUser,data,"ACT")
end

function CheckForEorLShare(connector,data,mode)
	local conNick = ""
	if mode == "ACT" then
		_,_,conNick = strfind(data,"^%$ConnectToMe%s(%S+)")
		if conNick then
			local entry = AConnects.t[connector.sName]
			if entry and (entry[conNick]) then
				AConnects.t[connector.sName][conNick] = nil
				return
			end
		end 
	elseif mode == "PAS" then
		_,_,conNick = strfind(data,"(%S+)|$")
	end
	if conNick then
		local connected = GetItemByName(conNick)
		if connected then
			local corShare = GetShare(connector.sMyInfoString)
			local cedShare = GetShare(connected.sMyInfoString)
			local class1,lolimit1,uplimit1 = GetShareClass(corShare)
			local class2,lolimit2,uplimit2 = GetShareClass(cedShare)
			if (class1 < class2) then
				return "toblock",class2,lolimit2,uplimit2,(lolimit2-corShare),conNick
			end
		else
			return "toblock"
		end
	else
		return "toblock"
	end
	if (mode == "PAS") then
		AConnects.t[conNick] = AConnects.t[conNick] or {}
		AConnects.t[conNick][connector.sName] = AConnects.timeout
	end
end

function GetShare(sMyINFO)
	local _,_,share = strfind(sMyINFO,"%$(%d+)%$|$")
	share = tonumber(share) or 0
	return share
end

function ConvShare(share)
	local tmes = { "B","KB","MB","GB","TB","PB" }
	local num = 1024
	for i = 1,getn(tmes) do
		local snum = num^i
		if (share < snum) or (i==getn(tmes)) then
			return format("%4.2f",share/snum*num).." "..tmes[i]
		end
	end
end

function GetShareClass(share)
	for i = 1,getn(ShareClasses) do
		if (share < ShareClasses[i]) or (i == getn(ShareClasses)) then
			return i,(ShareClasses[(i-1)] or 0),ShareClasses[i]
		end
	end
end

-- Allowed Connects
AConnects = {}
AConnects.t = {}
AConnects.timeout = 10

ConnectTriggs = {}
ConnectTriggs["$Rev"] = TrigOnRev
ConnectTriggs["$Con"] = TrigOnCon

function DataArrival(curUser,data)
        if strsub(data,1,1) == "$" and (not curUser.bOperator) then
                local str1 = strsub(data,1,4)
                if ConnectTriggs[str1] then
			local ret,class,lolim,uplim,diff,nick = ConnectTriggs[str1](curUser,data)
                        if ret then
				if class then
					curUser:SendData("*** User "..nick.." is of ShareClass: "..class..
					" ("..ConvShare(lolim).."-"..ConvShare(uplim).."), You need "..ConvShare(diff).." more share to be able to download.")
				end				
                                return 1
                        end
                end
        end
end

PlayboyDee

Ok, which script did yall post that blocks un regged users from downloading?  Dont want the share size restriction one or the VIP and Master only one either. Just the simple one that blocks unregged users.
thankx


honda

Hello CHill

Is there a way that the users who are blocked in a user.dat files is? And that everybody can unblock them.
Know the Op who blocked them must unblock the users.

If it is standing in a user.dat maybe it is possible that every Op can unblock them..

ANd with a !blocked command can seen who is in the list of blocked persons.

It that difficult to make?

Greetings Honda

mOrrI

lol.... i got lost...

can someone tell me what is the latest version of this bot...
or if there is more that one version can someone please post them here....

cause i could use this bot!

better than GAG! :D


Thanks in advance!!!

chill

hi honda,
no I think it won't be a problem, for witch script shall it be?

greets m0rri,
of witch script do you want the latest version, then I will check for new versions, but I think there are no new unposted ones, but I'm not sure.

chill

honda

Hello Chill

Nerbos has made a change in other forum.. That is what i want.

The solution

I will try to make some changes by my self..
Not a big scripter but will try.

Greetings

johnynl

#62
ok guy's this is what i got this far
i think im on the good track but i cant get the command !showblock to work.
it would be nice if it generated a list of the blocked users in our opchat, maybe one of you guy's can help me out.
    --100% Blocker by chill
    --Table Load and Save (added by nErBoS)

    sBot = "BLOCK-BOT"

    cmd1 = "!block"
    cmd2 = "!unblock"
    cmd3 = "!showblock"


    BlockedNicks = {}
    fBlock = "block.dat"
    OpChatName = frmHub:GetOpChatName()   --Use this line for inbuilt Px opchat


    --## Configuration ##--

    uLaterPtokax = 0   -- Choose 0 if you are using Ptokax Version 0.3.3.0 or higher
             -- Choose 1 if you are using Ptokax Version lower then 0.3.3.0

    --## END ##--

    function Main()
       frmHub:RegBot(sBot)
       frmHub:EnableFullData(1)
       LoadFromFile(fBlock)
    end

    function OnExit()
       SaveToFile(fBlock , BlockedNicks , "BlockedNicks")
    end

    BlockTriggs = {
       ["$Rev"] = 1,
       ["$Con"] = 2,
    }

    function DataArrival(curUser,data)
       if strsub(data,1,1) == "$" then
          local str1 = strsub(data,1,4)
          if BlockTriggs[str1] then
             if BlockedNicks[strlower(curUser.sName)] then
                curUser:SendData("*** You are not authorized to download.")
                return 1
             else if BlockTriggs[str1] == 1 then
                local _,_,conNick = strfind(data,"(%S+)|$")
                if BlockedNicks[strlower(conNick)] then
                   curUser:SendData("*** The user ..nick.. you are trying to download from is not authorized to upload.")
                   return 1
                end
             else if BlockTriggs[str1] == 2 then
                local _,_,conNick = strfind(strsub(data,14,strlen(data)),"^(%S+)")
                if BlockedNicks[strlower(conNick)] then
                   curUser:SendData("*** The user ..nick.. test you are trying to download from is not authorized to upload.")
                   return 1
                end
             end
             end
             end
          end
       end
       if (strsub(data,1,1) == "<" or strsub(data,1,5+strlen(sBot)) == "$To: "..sBot) and curUser.iProfile == 5 or curUser.iProfile == 0 then
          data = strsub(data,1,strlen(data)-1)
          local _,_,cmd,nick = strfind(data,"%b<>%s+(%S+)%s+(%S+)")
    ------------------------------------------------------------------------------------------  added by johnynl
          if (cmd=="!Showblock") then
             ReadBlockedNicks(file)
             return 1
          end
    -------------------------------------------------------------------------------------------  end
          if cmd and cmd == cmd2 and nick then
             if BlockedNicks[strlower(nick)] then
                BlockedNicks[strlower(nick)] = nil
                SendPmToOps(OpChatName, nick.." is now unblocked.")
                return 1
             end
          else if cmd and cmd == cmd1 then
             if BlockedNicks[strlower(nick)] == 1 then
                curUser:SendPM(sBot, nick.." is already blocked. Use !unblock to unblock this user.")
                return 1
             else
                BlockedNicks[strlower(nick)] = 1
                SendPmToOps(OpChatName, nick.." is now blocked.")
                return 1
             end
             if (uLaterPtokax == 1) then
                OnExit()
             end
                
             return 1  -- TELLS THE HUB TO STOP PROCESSING THE DATA
          end
          end
       end
    end

    -------------------------------------------------------------------------------------------- added by johnynl
    function ReadBlockedNicks(user, data, cmd)
       local release = ""
       readfrom(file)
       while 1 do
       local line = read()
       if (line == nil) then
       break
       else
       release = release.."   "..line.."\r\n"
       end
       end
       SendPmToOps(OpChatName, nick.."is a blocked nickname")
       readfrom()
    end
    ---------------------------------------------------------------------------------------------  end

    function Serialize(tTable, sTableName, sTab)
       assert(tTable, "tTable equals nil");
       assert(sTableName, "sTableName equals nil");
       assert(type(tTable) == "table", "tTable must be a table!");
       assert(type(sTableName) == "string", "sTableName must be a string!");
       sTab = sTab or "";
       sTmp = ""
       sTmp = sTmp..sTab..sTableName.." = {\n"
       for key, value in tTable do
          local sKey = (type(key) == "string") and format("[%q]",key) or format("[%d]",key);
          if(type(value) == "table") then
             sTmp = sTmp..Serialize(value, sKey, sTab.."\t");
          else
             local sValue = (type(value) == "string") and format("%q",value) or tostring(value);
             sTmp = sTmp..sTab.."\t"..sKey.." = "..sValue
          end
          sTmp = sTmp..",\n"
       end
       sTmp = sTmp..sTab.."}"
       return sTmp
    end

    function SaveToFile(file , table , tablename)
       writeto(file)
       write(Serialize(table, tablename))
       writeto()
    end

    function LoadFromFile(file)
       if (readfrom(file) ~= nil) then
          readfrom(file)
          dostring(read("*all"))
          readfrom()
       end
    end


thanks in advance for your help with this prob.
Yeah yeah ok
I am alway\'s running the latest Robocop version.
Im running Ptokax 0.3.3.0 build 17.05[debug]
Powered by: Robocop RCv10.01e

plz visit our hub at cccl-nl.no-ip.org:411

nErBoS

#63
Hi,

Check out the topic given by honda and you have there the script with that command.

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

BeeR

Some1 who has a script that blocks non-regged user to dload from OP's??
They must be a regged user t Dload from all OP's....
A cold BeeR is stunning !!

ARCHANGEL

That request has already been posted in this thread.

kazi

QuoteOriginally posted by [G-T-E]Gate?
This was Edited for me bu Pus;

Levels for downloads;


function Main() 
    
frmHub:EnableFullData(1

    
Levels = {
        
Master "1",
        
Operator "1",
        
VIP "1",
        
Reg "0",
        Default = 
"0"
    
}

end 

function DataArrival(curUserdata


    if (
strsub(data115) == "$RevConnectToMeand curUser.iProfile == -1then 
        local _
,_,towho strfind(data"$RevConnectToMe%s+%S+%s+(%S+)|"

        if 
isEnabled(GetProfileName(GetItemByName(towho).iProfile))=="1" then 
            curUser
:SendData("*** You must get registered to be able to download from Me so contact a person with [XXX] Tag to get Registered")     
        
end 

        
return 

    
elseif (strsub(data112) == "$ConnectToMeand curUser.iProfile == -1then 
        local _
,_,towho strfind(data"$ConnectToMe%s+(%S+)%s+.*|"
        
        if 
isEnabled(GetProfileName(GetItemByName(towho).iProfile))=="1" then 
            curUser
:SendData("*** You must get registered to be able to download from Me so contact a person with [G-T-E] Tag to get Registered")     
        
end 

        
return 
    end 

end 


function isEnabled(profile)
    
ret "0"
    
if profile then
        
for iv in Levels do        
            if ( 
== profile then
                ret 
v
            end
        end



Messege to user adjust to ur needs:

curUser:SendData("*** Add ur own messege to user here")     
        
end


Goodluck G8

**Trying to get this script working in ptokax 0.3.3.0  but i get all kinda line erros  , need this script to be modified for ptokax 0330?

SMF spam blocked by CleanTalk