share criteria redirector...
 

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

share criteria redirector...

Started by angelsanges, 12 March, 2004, 01:34:23

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

angelsanges

well well...it is possible to make a bot for select users (based on share) in a network?....

I'll try to explain:
i own 3 hubs...and i wold to select where the user are redirected...

1 hub [min share 3 GB...max share 7 GB]
2 hub [min share 7 GB...max share 10 GB]
3 hub [min share 10 GB]

now the bot redirects users  to the second/third hub if max share i reached.....



do you understand me?

sorry for my bad english...

nErBoS

Hi,

The min share you must configure in the hub software this will help you wiht the max share..

--Requested by angelsanges
--Made by nErBoS

Bot = "Share-Organizer"

maxshare1 = 7  --Max share for Hub1 in GB
maxshare2 = 10  --Max share for Hub2 in GB

address2 = "1.1.1.2" -- 2 Hub address
address3 = "1.1.1.3" -- 3 Hub address

function Main()
	frmHub:RegBot(Bot)
end

function NewUserConnected(user, data)
	local s,e,share = strfind(user.sMyInfoString, "%$%s*(%d+)%$") 
	share = format("%0.2f", tonumber(share)/(1024*1024*1024))
	if (share >= maxshare1) then
		user:SendData(Bot, "You are been redirect to another Hub of our Network where min share is "..maxshare1.." GB")
		user:SendData("$ForceMove "..address2.."|")
	elseif (share >= maxshare2) then
		user:SendData(Bot, "You are been redirect to another Hub of our Network where min share is "..maxshare1.." GB")
		user:SendData("$ForceMove "..address2.."|")
	end
end

Best regards, nErBoS
--## nErBoS Spot ##--

angelsanges

oh nice!....Thank you.
Another question...it is possible to expand your bot putting in it 5 hubs with 5 differents redirects (share)?

angelsanges

QuoteOriginally posted by nErBoS
   elseif (share >= maxshare2) then
      user:SendData(Bot, "You are been redirect to another Hub of our Network where min share is "..maxshare1.." GB")
      user:SendData("$ForceMove "..address2.."|")
   end
end[/code]

Best regards, nErBoS

elseif (share >= maxshare2) then
      user:SendData(Bot, "You are been redirect to another Hub of our Network where min share is "..maxshare2.." GB")
      user:SendData("$ForceMove "..address2.."|")
   end
end

or I'm wrong?

nErBoS

Hi,

You are right, here is it...

--Requested by angelsanges
--Made by nErBoS

Bot = "Share-Organizer"

maxshare1 = 7  --Max share for Hub1 in GB
maxshare2 = 10  --Max share for Hub2 in GB

address2 = "1.1.1.2" -- 2 Hub address
address3 = "1.1.1.3" -- 3 Hub address

function Main()
	frmHub:RegBot(Bot)
end

function NewUserConnected(user, data)
	local s,e,share = strfind(user.sMyInfoString, "%$%s*(%d+)%$") 
	share = format("%0.2f", tonumber(share)/(1024*1024*1024))
	if (share >= maxshare1) then
		user:SendData(Bot, "You are been redirect to another Hub of our Network where min share is "..maxshare1.." GB")
		user:SendData("$ForceMove "..address2.."|")
	elseif (share >= maxshare2) then
		user:SendData(Bot, "You are been redirect to another Hub of our Network where min share is "..maxshare1.." GB")
		user:SendData("$ForceMove "..address3.."|")
	end
end

Its possible to expand to 5 Hubs please give me the info of min share and max share of them.

Best regards, nErBoS
--## nErBoS Spot ##--

angelsanges

hub 1: min 1GB max 3 GB
hub 2: min 3GB max 5 GB
hub3: min 5GB max 7 GB
hub4: min 7GB max 10 GB
hub5: min 10GB max...

nErBoS

Hi,

Sorry have been a little busy...

--Requested by angelsanges
--Made by nErBoS

Bot = "Share-Organizer"

maxshare1 = "3"  --Max share for Hub1 in GB
maxshare2 = "5"  --Max share for Hub2 in GB
maxshare3 = "7"  --Max share for Hub3 in GB
maxshare4 = "10" --Max share for Hub4 in GB

address2 = "1.1.1.2" -- 2 Hub address
address3 = "1.1.1.3" -- 3 Hub address
address4 = "1.1.1.4" -- 4 Hub address
address5 = "1.1.1.5" -- 5 Hub address

function Main()
	frmHub:RegBot(Bot)
end

function NewUserConnected(user, data)
	local s,e,share = strfind(user.sMyInfoString, "%$%s*(%d+)%$") 
	share = format("%0.2f", tonumber(share)/(1024*1024*1024))
	if (tonumber(share) >= tonumber(maxshare1)) then
		user:SendData(Bot, "You are been redirect to another Hub of our Network where min share is "..maxshare1.." GB")
		user:SendData("$ForceMove "..address2.."|")
	elseif (tonumber(share) >= tonumber(maxshare2)) then
		user:SendData(Bot, "You are been redirect to another Hub of our Network where min share is "..maxshare1.." GB")
		user:SendData("$ForceMove "..address3.."|")
	elseif (tonumber(share) >= tonumber(maxshare3)) then
		user:SendData(Bot, "You are been redirect to another Hub of our Network where min share is "..maxshare1.." GB")
		user:SendData("$ForceMove "..address4.."|")
	elseif (tonumber(share) >= tonumber(maxshare4)) then
		user:SendData(Bot, "You are been redirect to another Hub of our Network where min share is "..maxshare1.." GB")
		user:SendData("$ForceMove "..address5.."|")
	end
end

Best regards, nErBoS
--## nErBoS Spot ##--

angelsanges

no probs....thank you!

nErBoS

#8
Hi,

Big BUG on the script that i made that wouldn't stop redirecting your users try this..

---Requested by angelsanges
--Made by nErBoS

Bot = "Share-Organizer"


maxshare = "5"  --Max share for HUB in GB

address = "1.1.1.1"  -- Redirect Adress

function Main()
	frmHub:RegBot(Bot)
end

function NewUserConnected(user, data)
	local s,e,share = strfind(user.sMyInfoString, "%$%s*(%d+)%$") 
	share = format("%0.2f", tonumber(share)/(1024*1024*1024))
	if (tonumber(share) >= tonumber(maxshare) ) then
		user:SendData(Bot, "You are been redirect to another Hub of our Network where min share is "..maxshare.." GB")
		user:SendData("$ForceMove "..address.."|")
	end
end

You have to configurate to each hub :)

Best regards, nErBoS
--## nErBoS Spot ##--

angelsanges

well well....NICE very NICE... :D
thank you!

SMF spam blocked by CleanTalk