PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: Jorgesc on 05 January, 2005, 15:42:05

Title: Block Script
Post by: Jorgesc on 05 January, 2005, 15:42:05
Hello to all,

I need a scripts that block download from unreg users. But, allow search to all users

I search it here. But, I not found.

Thanks for the help  :D.

Sorry my english    :]
Title:
Post by: bastya_elvtars on 05 January, 2005, 15:43:08
search some nonreg can download nonreg

i know it exists, i have contributed 2 it as well :)
Title: Thanks
Post by: Jorgesc on 05 January, 2005, 15:48:58
Thanks men.     :D.

I find it, but this script not alloe make search for the nonreg users.
Title:
Post by: TTB on 05 January, 2005, 23:41:46
Thisone does:

--## 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("<[BOT]PLAY> You can't download from 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("<[BOT]PLAY> You can't download from regged users!")  
  return 1
        end

end
end

Bye