READ THE RULES
0 Members and 1 Guest are viewing this topic.
--============================================================--========= Network hub pinger redirect Manager ==============--============= By ¨˜”°º•Hawk•º°”˜¨ 25-05-04 =================--============================================================--=====This Script is designed to be run on its own hub ======--======= Use another Ptokax hub on a different port =========--============================================================--========== +rdon = enable / +rdoff = disable ===============--================== Editable settings =======================sBot = "Network-Redirector-" --// Bot nameDefaultHub = "DefaultHub.no-ip.org:411" --// Default redirect hub Addy:PortRedirectsEnabled = "true" --// true/false Auto startmins = 1 --// Ping Next Hub after # minsHub_Adress = { "Hub1.no-ip.com","411","Hub2.no-ip.org", --// Hubs In network"415", --// you can add / remove as many as you want"Hub3.servemp3.com", --// but keep the same layout"412", --// hub then port"Hub4.no-ip.org", "417", "Hub5.servemp3.com", "411", "Hub6.no-ip.com", "414", "Hub7.no-ip.com", "412", }--========= Mess With The Below at your own Peril ===========Onlinehubs = {}HubCounter = 1curenthub = 1curentport = 2function Main() hubcount = getn(Hub_Adress) SetTimer(1000 * 60 * mins) if RedirectsEnabled == "true" then StartTimer() endendfunction NewUserConnected(curUser) if (RedirectsEnabled == "false") then frmHub:SetRedirectAddress(DefaultHub) end SendToNick(curUser.sName, "<" ..sBot .."> Redirecting... |$ForceMove "..frmHub:GetRedirectAddress().."|")end function DataArrival(user, data) local data=strsub(data,1,strlen(data)-1) local s,e,cmd = strfind(data,"%b<>%s+(%S+)") if cmd=="+rdon" then SendToOps(sBot," Redirects enabled ") StartTimer() RedirectsEnabled = "true" elseif cmd=="+rdoff" then SendToOps(sBot," redirects disabled ") StopTimer() RedirectsEnabled = "false" endendfunction OnTimer() if curentport == hubcount + 2 then curenthub = 1 curentport = 2 end displayhub(curenthub,curentport) curenthub = curenthub + 2 curentport = curenthub + 1 frmHub:SetRedirectAddress(Onlinehubs[HubCounter]) if (getn(Onlinehubs) == 0) then frmHub:SetRedirectAddress(DefaultHub) end if HubCounter == getn(Onlinehubs) then HubCounter = 1 else HubCounter = HubCounter + 1 end CurrentOnlineHubs()end--============================================================--===================! ! ! PING ! ! ! =======================function displayhub(curenthub,curentport) local a = connect(Hub_Adress[curenthub],Hub_Adress[curentport]) CurrentChecking = Hub_Adress[curenthub]..":"..Hub_Adress[curentport] Active = "false" ActiveHubCount = getn(Onlinehubs) + 1 for index, value in Onlinehubs do if Onlinehubs[index] == CurrentChecking then Active = "true" Position = index end end if a == nil then if Active == "false" then SendToOps(sBot,CurrentChecking.." Hub is still Offline") elseif Active == "true" then SendToOps(sBot,CurrentChecking.." Hub Has Gone Offline") Onlinehubs[Position] = nil end else if Active == "false" then SendToOps(sBot,CurrentChecking.." Has Come Online") Onlinehubs[ActiveHubCount] = CurrentChecking elseif Active == "true" then SendToOps(sBot,CurrentChecking.." Hub is still online") end a:close() endend--============================================================--===================! ! ! PONG ! ! ! =======================function CurrentOnlineHubs() local names = "\r\n\r\n-------------Curent Online Hubs----------------\r\n\r\n\t" for index, value in Onlinehubs do local line = index names = names.." "..Onlinehubs[line].."\r\n\t" end names = names.."\r\n\r\nCurently Redirecting to "..frmHub:GetRedirectAddress().."\r\n\r\n" SendToOps(sBot,names)end--===================== End Of Script ========================
"xxx.dyndns.xx", "1413",
DefaultHub = "DefaultHub.no-ip.org:411" --// Default redirect hub Addy:Port
DefaultHub = "BackupHub.no-ip.org:411" --// Backup redirect hub Addy:PortRedirectsEnabled = "true" --// true/false Auto startmins = 5 --// Ping Next Hub after # minsHub_Adress = { "MainRedirectTo.no-ip.com", --// Permanent redirect addy"411",}--========= Mess With The Below at your own Peril ===========
sBot = "###################" --// Bot name DefaultHub = "########.no-ip.info:411" --// Default redirect hub Addy:Port RedirectsEnabled = "true" --// true/false Auto start mins = 0.083333 --// Ping Next Hub after # mins Hub_Adress = { "#########.no-ip.info", --// Hubs In network "411", --// you can add / remove as many as you want "#########.no-ip.info", --// but keep the same layout "411", --// hub then port "#########.no-ip.info", "411", "#########.no-ip.info", "411", "#########.no-ip.info", "411", "#########.no-ip.info", "413", }
Originally posted by I_Am_Canadian is there anyway to change this so it sends to a certien hub via min share instead of just hubcount