BCDC++ only
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

BCDC++ only

Started by Madman, 02 August, 2005, 18:47:40

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Madman

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
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

lyte

Fanx dude gj :) but 1 thing min 10kB but max 50KB can u set it too in this script not more than 50KB upl :))

Madman

Yes... Script updated... =)
You are the first that i kno that want a MaxLimit check.. ;P
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

lyte

FAnx fanx fanx fanx dude and again fanx :)))
its workin and i hope will be good for our network :))
Thankie again
U DA MAN!

lyte

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

Madman

How do u mean?
You want a script to make the user have exatly 50 Kb in limt? if 49 or 51 it disconncet?
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

lyte

:)
#6
limit speed dl not more than 50kB, or exacly 50kB and over 50kB ppl will b  disconectin

Madman

#7
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....
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

lyte

Ok Fanx dude this goin well wif bcdc :)
Fanx alot

Madman

We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

SMF spam blocked by CleanTalk