Hi all,
this is one of the last script wich I need the conversion before upgrade my PX to new API ::)
Quote--[[
Max uploadlimit check for profiles
* Stripped From Horus script *
by C��o�y�� (04/12/07)
Cleanup by amenay (saw it on the PXA Hub Codeboard and couldn't resist)
]]--
settings = {
botname = SetMan.GetString( 21 ) or "Bot-Name",
limiter = { -- profile number,max limit (0=off)
[-1] = 20, -- if user has limit value 40 he gets redirected,if 51 he can login
},
redirect = SetMan.GetString( 6 ) or "anyhub.somedns.net";
}
MyINFOArrival = function( user, data )
if settings.limiter[ user.iProfile ] then
local sAmount = limitercheck( user )
if sAmount then
local sMsg = "Connection limited too much (Found: "..sAmount.." kb/s Limit: "..settings.limiter[user.iProfile].." kb/s)";
Core.Redirect( user, settings.redirect, sMsg )
BanMan.TempBanIP( user.sIP, 5, sMsg , settings.botname, false )
end
end
end
limitercheck = function( user )
local amount = Core.GetUserValue( user, 22 ) or Core.GetUserValue( user, 4 ):match( ("^%d+"), 13 );
amount = tonumber( amount )
if amount and amount < settings.limiter[ user.iProfile ] and not amount == 0 then
return amount;
end
end
It's already been converted by amenay but it doesn't works....
Thanks in advance ;D
It is a little diffrent, but you can use another script (UpLimit 1.0 L5.1). :) Tell thanks Mutor. ;)