PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: Jaakko on 11 May, 2005, 06:30:20

Title: Rediredt passive modification
Post by: Jaakko on 11 May, 2005, 06:30:20
Could someone modify this script so that it would check passive users share and redirect if less than xxGB.
-- Redirect all passive users
-- Script by PPK

function NewUserConnected(curUser)
    if curUser.iProfile == -1 and curUser.bActive == nil then
        curUser:Redirect(frmHub:GetRedirectAddress(), "Sorry passive users not allowed here.")
    end
end
Thanks in advance
Title:
Post by: Madman on 11 May, 2005, 10:05:46
Try this...

-- Redirect all passive users
-- Script by PPK
-- MinShare check by Madman

MinShare = 2 -- Min share in GB

function NewUserConnected(curUser)
if curUser.iProfile == -1 and curUser.bActive == nil then
if curUser.iShareSize < (1024*1024*1024*MinShare) then
curUser:Redirect(frmHub:GetRedirectAddress(), "Sorry passive users must share atlest " ..MinShare.. " GB")
end
end
end