redirect array
 

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

redirect array

Started by [KATZ]ice, 12 April, 2005, 20:01:32

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

[KATZ]ice

yeah, i know, there are already scripts for this.

but i want it plain and easy, no pinging or whatever

just, user join, gets send to a hub
next user joins gets send to the next
and so on, then as a finish, just the process all over again

ok, that'z the easy part i guess

before sending a user to a hub, it first get checked if it has enough share for that hub (this sould be ajustable in the script) if he/she doesn't he/she will get send to a hub, which is standard for those problems

Cheers ICE

[KATZ]ice

hmm, ok, i tried a bunch of scripts, tried to edit it, result: World disaster..., PLZ HELP :P

Cheers IE

jiten

Try this one:
-- Requested by 3lancer and converted to Lua 5 by jiten
-- Made by nErBoS
-- Corrected by NightLitch
-- added endless amount of hubs by plop
-- modded for setting user levels to be redirected by bastya_elvtars (nice crew in here)
-- CheckUserLevel originally by Nathanos
-- CheckUserLevel eliminated by plop

Bot = "Share-Redirecter"

-- biggest hub 1st, share size in GB
tHubs = {
	{ ["share"] = 10,  ["domain"] = "hub1.no-ip.com", ["name"] = "Our 10GB MinShare Hub" },
	{ ["share"] = 5, ["domain"] = "hub2.no-ip.com", ["name"] = "Our 5GB MinShare Hub" }
}

function Main()
	frmHub:RegBot(Bot)
end

function NewUserConnected(user, data)
	share = user.iShareSize
	if(tonumber(share)) then
		share = tonumber(share) / (1024*1024*1024)
		for i=1,table.getn(tHubs) do
			if share > tHubs[i]["share"] then
				user:Redirect(tHubs[i]["domain"], tHubs[i]["name"])
			end
		end
	end
end

Best regards,

jiten

[KATZ]ice

it comes close, but it's not what i want, if i have 30 GB, i'll always get redirected to hub 1, but i want it to be redirected to the other hubs as well, so the target hub needs to change every time some one joins, but when i have 7 GB, it does change as well, but just not to the first hub....

This is to prevent me from joining a hub, which i can't enter anyways

Thx

Cheers ICE

SMF spam blocked by CleanTalk