Extra feature recuest on HSS Check 1.0b LUA 5.1x [Strict] [API 2]
 

Extra feature recuest on HSS Check 1.0b LUA 5.1x [Strict] [API 2]

Started by OPfrenske, 20 June, 2010, 00:23:11

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

OPfrenske

Hi all,

Been trying myself for a while now but can't figure it out.

It's a nice bot using standard hub/slot ratio for checking.

In my hub (because of increasing internet speeds) we like users to open more slots than required by ratio.

Normal REG have to open an extra slot (= speed < 10 mbit).
VIP however have to open 4 extra slots (= speed > 10 mbit, most of them 100mbit)

Is it possible to ad a feature to above bot to check for ratio like this?

-- [#] = {MinShare in GB,MaxHubs,*Slot/Hub Ratio OR Max Slots,[u]**EXTRA SLOTS[/u]},
local Profiles = {
	[-1] = {100,4,1,0},
	[0] = {0,0,0,0},
	[1] = {0,0,0,0},
	[2] = {100,8,1,0},
	[3] = {100,8,1,0},
	[4] = {800,8,1,4},
	[5] = {100,8,1,4},
	[6] = {800,4,1,1},
	[7] = {100,4,1,1},
	}
-- *Use slot count as a ratio? [3rd value in the Profiles array] true/false
-- *If set to false slot count is max slot limit set Profiles array accordingly
local Ratio = true


Then something should change in here i guess.
(srry it's allready translated a bit into dutch)
else
					if Ratio then
						if tab[3]> 0 and (t[3])/t[2] < (tab[3]*t[2])) then
							rsn = "Under minimum slot:hub ratio"
							local hs,cs = tab[3]*t[2],math.ceil((tab[3]*t[2]) - t[3])
							m,x = tostring(cs).." too few slots for "..p.."s. "..
							"Je zit in "..tostring(t[2]).." hubs waarvoor je "..
							" "..tostring(hs).." slots moet openen.",true
						end
					else
						if tab[3] > 0 and t[3] > tab[3] then
							rsn = "Teveel slotjes geopend"
							local hs,cs = tab[3],t[3] - tab[3]
							m,x = tostring(cs).." teveel slots voor "..p.."s. "..
							"Je mag maar "..tostring(hs).." slots openen.",true
						end
					end
				end



I just can't get it to work, tried adding 4 in hub/slots ratio (directly in script, not as mentioned above), but ended up multiplying by 4 in stead of adding 4.

tnx in advance

OPfrenske

Hi again, i don't want to check user speeds, we know what speeds our users should be having.

Only thing i'd like is a script that (for REG and TB-REG in my hub) demands for minslots = (hubs+1)
And for VIP and TB-VIP demands minslots = (hubs+4)

It;'s just to make life a little easier for me and the other OP's.
Now we have to go past all users manualy, and since pc's are as smart as you programm then to be  ;D i thougt it could fit in a script.

Something like that doesn't look too difficult in my opinion, but i can't fix it because my options give an error.


OPfrenske

Well we check for size as well, min share for TB users = 800 GB, there is allways a change a harddisc gets broken.

Mostly the check is for the slot part. This is done by profile.

Srry for not being clear. Normal REG have to open an extra slot (= speed < 10 mbit). The speed part didn't have to be in there.
If someone has speed <10 than they can only become a REG or MOD.
There are some advantages being a TB user in our hub.

But to be short is it possible to addapt the HSS Check to have sertain users opening extra slots?


SMF spam blocked by CleanTalk