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...
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
oh nice!....Thank you.
Another question...it is possible to expand your bot putting in it 5 hubs with 5 differents redirects (share)?
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?
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
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...
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
no probs....thank you!
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
well well....NICE very NICE... :D
thank you!