PtokaX forum

Lua 5.3/5.2/5.1 Scripts (for PtokaX 0.4.0.0 and newer) => Request for scripts => Topic started by: atonal on 20 December, 2008, 18:05:11

Title: Block Limiter
Post by: atonal on 20 December, 2008, 18:05:11
many user conect with limiter here is one ejemplo:

   ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   -=-hub-=- User Info: ejempl
   ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   User                             : V???blablal (Online)
   Description                : Series,Peliculas,Documentales,Music
   Connection                : 1
   Email                            : balvlal@gmail.com
   IP                               : 87.222.49.000
   DNS                              : 114.49.222.87.dynamic.blabla.es
   Country                       : blabla
   Profile                          : VIP
   Share                            : 5.84 gb
   Hubs                             : 3 (0/2/1)
   Slots                            : 6
   Limiter                          : 60          <<<------------- how i can block limiter?
   Mode                             : A
   Client                           : StrgDC++ V:2.21
   Tag                              : <StrgDC++ V:2.21,M:A,H:0/2/1,S:6,L:60>
   Rightclick Support               : TRUE
   Deflood Warns                    : 0
   Online Time                      : 17 Minutes, 46 Seconds
   ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   Type !help to view available commands.
   ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::



my questios is,  somby can make scripts for this estuped user who dont like to share well :60 LIMITER is to much:
Title: Re: Block Limiter
Post by: atonal on 20 December, 2008, 21:12:28
Sorry mutor is not work  is to bad  y try and the user steal there, this scripts cant do nothing, probably som is no good
Title: Re: Block Limiter
Post by: atonal on 20 December, 2008, 22:06:55
--[[
Max Limit 1.0 LUA 5.1x [Strict][API 2]

By Mutor 12/20/08

Tempbans users with too great a limit set.
- Limt setting, per profile
- Time setting for tempban

]]

-- "Botname" ["" = hub bot]
Bot = ""
--Set your profiles / permissions here.
-- [#] = integer, (Maximum limit allowed for profile in kbits/sec.)
local Profiles = {
[-1] = 0,-- Unregistered User
[0] = 0, -- Owner
[1] = 0, -- Master
[2] = 0, -- SuperOP
                  [3] = 0, -- Operator
                  [4] = 0, -- SVIP
                  [5] = 0, -- VIP
                  [6] = 0, -- Registered User
}
--TempBan time in minutes, 0 = default tempban time from GUI
local BanTime = 0

OnStartup = function()
if Bot == "" then Bot = SetMan.GetString(21) end
end

MyINFOArrival = function(user,data)
local val = Core.GetUserValue(user,22)
val = tonumber(val)*1000 or 0
local max = Profiles[user.iProfile]
if max and max > 0 then
max = max*1000
if val > max then
local Msg = "Sorry "..user.sNick..", this hub enforces a maximum "..
"upload limit of "..FmtSz(max).." or higher. Your limit of "..FmtSz(val).." is "..
FmtSz(tab[1]-val).." short of the minimum You will now be disconnected."
local Rsn = "Upload limit set to "..FmtSz(val)
Core.SendToUser(user,"<"..Bot.."> "..Msg.."|")
return BanMan.TempBan(user,BanTime,Rsn,Bot,false),true
end
end
end

FmtSz = function(int)
local i,u,x=tonumber(int) or 0,{"","k","m","g","t","p"},1
while i > 1024 do i,x = i/1000,x+1 end return string.format("%.2f %sbps.",i,u[x])
end



this is the way i was set the scripts, a set 0 and each profile, because i whant no bory habe upload limiters
Title: Block Limiter is working
Post by: atonal on 21 December, 2008, 01:04:47
  thanks Mutor now is working sorry some time i am estuped, is no easy for my fine some time 
y read scripts slowly now is working well

now all this faker with limiter are gone  lol  i nead to habe clean hub



:D ;) :)