PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: Jerry on 18 July, 2005, 19:40:06

Title: Different share sizes for active or passive users
Post by: Jerry on 18 July, 2005, 19:40:06
Hello guys,

Can you somebody help me with the script: different share sizes for active or passive users (eg. for active users: 1GB and for passive users: 5GB)

Can you help me, please?

 Thank you in advance for help!
Title:
Post by: Madman on 18 July, 2005, 20:58:33
-- Diff Share 4 Passive
-- Made by Madman
-- Request by Jerry

tConfig = {
["Bot"] = "DiffShare", -- Name on the bot
["PShare"] = 1, -- Share for passive. in GB
["AShare"] = 170, -- share for Active. in GB
}

function NewUserConnected(curUser)
if curUser.iProfile == 2 then
else
if curUser.bActive == nil then -- If passive
if curUser.iShareSize/1024^3 <= tConfig.PShare then -- If bellow min Passive share
curUser:SendData(tConfig.Bot, "You don't have enough share for a Passive user. Minimum us " ..tConfig.PShare.. " GB")
curUser:Disconnect() -- Disconnet
end
else -- If active
if curUser.iShareSize/1024^3 <= tConfig.AShare then -- If bellow min Active share
curUser:SendData(tConfig.Bot, "You don't have enough share for a Active user. Minimum is " ..tConfig.AShare.. " GB")
curUser:Disconnect() -- Disconnect
end
end
end
end

There you go... This should do the trick... =)

*Edit*
Fixa a small bug... ;p
Title:
Post by: Jerry on 18 July, 2005, 21:56:20
QuoteOriginally posted by madman

There you go...

OK :)
Thank you very much Madman!!!