This script is really needed 'cause testing PtokaX DC Hub 0.3.3.1 [debug] I verified it is not supporting hublist pinger correctly.. anyway:
since two days ago I started the new ptokax and users stats on the www.hublist.org ARE GONE...
have a look here http://www.hublist.org/?p=hub&id=53749
so please somebody translate this script from lua 4 to lua 5
Quote-- script begin
--// HubINFO-BotINFO support script for PtokaX by Gadget
--// Optional hubowner's email address for editing hub info in www.hublist.org
OwnerEmail="owner@hub.com"
--// No need to edit other settings
MinSlots=0
MaxHubs=0
function Main()
HubAddress=GetFromIni("HubAddress")..":"..GetFromIni("HubPort")
if GetFromIni("MinSlotsChecker")=="1" then
MinSlots=GetFromIni("MinSlots")
end
if GetFromIni("HubChecker")=="1" then
MaxHubs=GetFromIni("MaxHubs")
end
end
function DataArrival(curUser,data)
if strsub(data,1,9)=="$BotINFO " then
curUser:SendData("$HubINFO "..frmHub:GetHubName().."$"..HubAddress.."$"..frmHub:GetHubDescr().."$"..frmHub:GetMaxUsers().."$"..floor(frmHub:GetMinShare()*1048576).."$"..MinSlots.."$"..MaxHubs.."$PtokaX 0.3 ".._VERSION.." script$"..OwnerEmail)
end
end
function GetFromIni(var)
local result=""
readfrom("../PtokaX.ini")
while 1 do
local line=read()
if line==nil then
break
else
if strsub(line,1,strlen(var)+1)==var.."=" then
result=strsub(line,strlen(var)+2,strlen(line))
break
end
end
end
readfrom()
return result
end
--- scrip end
in addition to what is red I know also that change the string functions is needed... but I'm not sure about the rest.
Thank you if you translate it
Regards
Robert
This is the HubInfo.lua translated in lua 5.
Sorry, did not found it before (either if I searched it)
found it right now and...
... going to see into two days if it does work.
Bye
Robert
Quote--// HubINFO-BotINFO support script for PtokaX by Gadget
--// Optional hubowner's email address for editing hub info in //www.hublist.org
OwnerEmail="xxx@xxx"
--// No need to edit other settings
MinSlots=0
MaxHubs=0
function Main()
HubAddress=GetFromIni("HubAddress")..":"..GetFromIni("HubPort")
if GetFromIni("MinSlotsChecker")=="1" then
MinSlots=GetFromIni("MinSlots")
end
if GetFromIni("HubChecker")=="1" then
MaxHubs=GetFromIni("MaxHubs")
end
end
function BotINFOArrival(curUser, Data)
curUser:SendData("$HubINFO "..frmHub:GetHubName().."$"..HubAddress.."$"..frmHub:GetHubDescr().."$"..frmHub:GetMaxUsers().."$"..math.floor(frmHub:GetMinShare()*1048576).."$"..MinSlots.."$"..MaxHubs.."$PtokaX 0.3 ".._VERSION.." script$"..OwnerEmail)
end
function GetFromIni(var)
local result=""
local file = io.open("../PtokaX.ini","r")
while 1 do
local line=io.read()
if line==nil then
break
else
if string.sub(line,1,string.len(var)+1)==var.."=" then
result=string.sub(line,string.len(var)+2,string.len(line))
break
end
end
end
io.read()
io.close()
return result
end
Hi Hublist pingers are supported on PtokaX 0.3.3.1 :D ....There was a prob to start with but not prob with P/X, prob was with pinger itself.Which as since been fixed :D
Maybe be
but also with the translated script... it is not working
check link at top and see yourself.
Hub is online but users are not counted...
HEEELP!!!!
PX does a perfect job of HubList entry without the need for scripting..
theres no code in my script for it ..
??????Hawk??????
Maybe
have a look here http://www.hublist.org/?p=hub&id=53749 (http://www.hublist.org/?p=hub&id=53749)
until it was ptokax 326 with the HubInfo.lua script, users were counted correctly...
and please note... running 326 without that script makes the same problem that I have right now that I upgraded to 331.
So, if you know special Ptokax settings for the hublist pinger... well: tell them to me... if not, juast have a look to the hub stats @ the above link and see.
Thank you
Robert
No special settings required .... only thing you can set is reporting hub pinger to op's
mine works fine :]
check here (http://www.hublist.org/?p=hub&id=134907)
Have you got an ip script running thats stopping the pinger getting in to check hub ?(
I have migrated all my scripts to lua 5.
There is one that ensures the access to dc++ only clients but it is not changed and was there also with previous version 326.
PtokaX 0.3.3.1
this version of Ptokax reports to Pingers no problem.
no script required..
but the result at hublist.org is:
server ONLINE
users 0 (zero) (none) (nicht users) (nessuno)
Check the link at top. edited well I can suicide myself... my hub is disappeared from hublist.org
_____
Right now I've disabled the HubInfo.lua script.
We'll see, but I feel what will happen...
_____
Thank you for the moment