PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: FrAcTi0n on 17 November, 2004, 17:03:28

Title: help with download blocker....
Post by: FrAcTi0n on 17 November, 2004, 17:03:28
hello i tried a lot of download blockers, but i didn`t find any that is 100% working...

so request is:
non regged users cannot download
other users can download from anyone
send message to non registered user if he tries to download...

finally i found one, but when passive registered user tries to download from active non registered user---- connection timeout...
Title:
Post by: nErBoS on 17 November, 2004, 22:16:17
Hi,

Can you show us the script that does that ??

Best regards, nErBoS
Title:
Post by: FrAcTi0n on 17 November, 2004, 22:25:28
oka, i am at work right now, so i will paste it when i reach home,  in about 1 and half hour.)
Title:
Post by: FrAcTi0n on 18 November, 2004, 09:25:02
code:

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("*** Nejsi registrovany uzivatel, zaregistruj se a budes moct vyhledavat a stahovat... You are not registered in this hub please register and you may download.")

      return 1

   end

end
Title:
Post by: nErBoS on 18 November, 2004, 13:31:10
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) then
curUser:SendData(sBot, "You can't download.")
  return 1
        elseif (towho ~= nil) then
arrRC[towho] = 1
end
elseif (strsub(data, 1, 12) == "$ConnectToMe" and curUser.iProfile == -1) then
if (arrRC[curUser.sName] ~= nil) then
arrRC[curUser.sName] = nil
else
curUser:SendData(sBot, "You can't download.")
  return 1
        end

end
end

Best regards, nErBoS
Title:
Post by: FrAcTi0n on 18 November, 2004, 13:50:11
thx verry much.) workin 100%
Title:
Post by: FrAcTi0n on 29 November, 2004, 12:37:25
hmm tested again on 100% connection and still not working... if i switch to passive at home and recconenct it works fine, but when i try to do that from work (behind server) it is not working, the same shit, connection timeuot until i register them...
Title:
Post by: nErBoS on 30 November, 2004, 01:26:12
Hi,

When i have time i will check it.

Best regards, nErBoS