PtokaX forum

Archive => Archived 5.0 boards => Finished Scripts => Topic started by: Madman on 02 August, 2005, 18:47:40

Title: BCDC++ only
Post by: Madman on 02 August, 2005, 18:47:40
Trying to keep a cleen forum.... ;)
There for posted in new thread...

-- Only BcDC script
-- Made by Madman
-- Requested by lyte
-- Added: Profiles 2 check, set the profile to 1 to check them
-- Added: Max Limit...

tConfig = {
["Bot"] = "BCDC++Only", -- Bot Name
["MinVer"] = "0.674", -- Mive Version for BCDC++
["MinLimit"] = 10, -- Min allowed limit
["MaxLimit"] = 50,
}

Profiles2Check = {
-- 1 Means check, 0 mean no checking
[0] = 0, -- Masters
[1] = 1, -- Operators
[2] = 1, -- Vips
[3] = 1, -- Regs
[-1] = 1, -- Users (unreg)
}


function MyINFOArrival(curUser, data)
if Profiles2Check[curUser.iProfile] == 1 then
if curUser.bHasTag then -- Check for tag
if not string.find(curUser.sTag, "B:") then -- If we dont find B: in tag
curUser:SendData(tConfig.Bot, "This is a BCDC++ hub only!") -- Tell us
curUser:SendData(tConfig.Bot, "If you are using BCDC, please turn on you limter")
curUser:SendData(tConfig.Bot, "Min limit is " ..tConfig.MinLimit.. " Kb/s, min version is " ..tConfig.MinVer)
curUser:SendData(tConfig.Bot, "Disconnecting...")
curUser:Disconnect() -- Disconnect user
else -- We found B: in tag
if curUser.sClientVersion < tConfig.MinVer then -- Check is users version allowed?
curUser:SendData(tConfig.Bot, "To low BCDC+ version, Min version is " ..tConfig.MinVer) -- Nope... ;)
curUser:SendData(tConfig.Bot, "Disconnecting...")
curUser:Disconnect() -- Disconnect
end
if curUser.iBlimit < tConfig.MinLimit then -- Does user have limit to low
curUser:SendData(tConfig.Bot, "To low limter, min limit is " ..tConfig.MinLimit.. " Kb/s") -- Yes
curUser:SendData(tConfig.Bot, "Disconnecting...")
curUser:Disconnect() -- Disconncet
elseif curUser.iBlimit > tConfig.MaxLimit then -- Does user have limit to high
curUser:SendData(tConfig.Bot, "To high limter, max limit is " ..tConfig.MaxLimit.. " Kb/s") -- Yes
curUser:SendData(tConfig.Bot, "Disconnecting...")
curUser:Disconnect() -- Disconncet
end
end
end
end
end
Title: :)
Post by: lyte on 02 August, 2005, 19:06:10
Fanx dude gj :) but 1 thing min 10kB but max 50KB can u set it too in this script not more than 50KB upl :))
Title:
Post by: Madman on 02 August, 2005, 19:45:17
Yes... Script updated... =)
You are the first that i kno that want a MaxLimit check.. ;P
Title: Thankie
Post by: lyte on 02 August, 2005, 19:55:34
FAnx fanx fanx fanx dude and again fanx :)))
its workin and i hope will be good for our network :))
Thankie again
U DA MAN!
Title: :>
Post by: lyte on 02 August, 2005, 20:08:11
Madman just 1 question
is possible to make a script which 1 will limit ppl on hub to 50kB? Or just only way for do dat is with bcdc which 1 u made for me?  
but im still happy of this script what u have done :)))))
:* grazie
Title:
Post by: Madman on 02 August, 2005, 21:55:08
How do u mean?
You want a script to make the user have exatly 50 Kb in limt? if 49 or 51 it disconncet?
Title: :)
Post by: lyte on 02 August, 2005, 23:43:48
limit speed dl not more than 50kB, or exacly 50kB and over 50kB ppl will b  disconectin
Title:
Post by: Madman on 03 August, 2005, 05:58:49
ppl got 2 a have limiter in there clients..
but i can force them to always keep the upload limit on 50.. there own download limit i cant do anything about...
dl limit dont show in tag....
Title: :)
Post by: lyte on 03 August, 2005, 10:16:24
Ok Fanx dude this goin well wif bcdc :)
Fanx alot
Title:
Post by: Madman on 03 August, 2005, 18:05:49
Np =)