PtokaX forum

Archive => RoboCop => AllInOne Scripts => Archived 5.1 boards => RoboCop - Requests => Topic started by: DirTyDogG on 19 December, 2006, 17:27:58

Title: Reg to download from op's
Post by: DirTyDogG on 19 December, 2006, 17:27:58
Can u make like this that only registered users can download from op's ? ???
Title: Re: Reg to download from op's
Post by: bastya_elvtars on 19 December, 2006, 19:44:19
For instance, this (http://forum.ptokax.org/index.php?topic=3830#msg40804) could easily be modded to suit your needs.
Title: Re: Reg to download from op's
Post by: DirTyDogG on 23 December, 2006, 14:08:09
I know this script , but it would be very nice that anybody create a script that blocks unregistered users to download from OP's only  :-\
Title: Re: Reg to download from op's
Post by: Naithif on 23 December, 2006, 14:50:11
Try this one
Modified (one function line) from this one: http://forum.ptokax.org/index.php?topic=5750.0 (http://forum.ptokax.org/index.php?topic=5750.0)


-- XferBot 1.0 LUA 5
--
-- by Mutor  12/03/05
--
-- Requested by Pablo.zz
--
-- Blocks file transfers from registered users to unregistered users.
-- Allows transfer between unregistered users
--

-- botname pulled from the hub or "Custom" name"
BlockBotName = "[XferBot]" --frmHub:GetHubBotName(),
--
--End User Settings-------------------------------------------------------------

Main = function()
if BlockBotName ~= frmHub:GetHubBotName() then
frmHub:RegBot(BlockBotName, 1, "Transfer Filter", "")
end
end

CheckArrival = function(user, data)
    if user.iProfile == -1 then
    local other = ""
    local s,e,activeother = string.find(data,"$ConnectToMe%s+(%S+)")
    local s,e,passiveother = string.find(data,"^$RevConnectToMe%s+%S+%s+(%S+)|$")
    if activeother then
    other = GetItemByName(activeother)
    elseif passiveother then
other = GetItemByName(passiveother)
end
    if other ~= "" or other ~= nil then
if other.bOperator then
local reply = "\r\n\r\n\tSorry "..user.sName..",\r\n"..
"\tUnregistered users may not dowload files from operators.\r\n"..
"\tYou may only download from non-operator users.\r\n"..
"\tPlease clear this transfer from your download queue.\r\n"..
"\tOtherwise you will continue to receive this message\r\n\r\n"
user:SendData(BlockBotName, reply)
user:SendPM(BlockBotName, reply)
    return 1
    end
    end
    end
end

ConnectToMeArrival = CheckArrival
RevConnectToMeArrival = CheckArrival
MultiConnectToMeArrival = CheckArrival
Title: Re: Reg to download from op's
Post by: DirTyDogG on 24 December, 2006, 13:05:01
Thx  8)