PtokaX forum

Archive => Archived 5.0 boards => Finished Scripts => Topic started by: plop on 28 February, 2005, 17:43:29

Title: BotINFO
Post by: plop on 28 February, 2005, 17:43:29
-- PtokaX Lua 5 version by PPK

owneremail = PLACE_OWNER_EMAIL_HERE

function UnknownArrival(curUser, sData)
--// simple $BotINFO implementation //--
if string.sub(sData, 1, 8) == "$BotINFO" then
curUser:SendData("$HubINFO "..frmHub:GetHubName().."$"..frmHub:GetHubAddress()..frmHub:GetHubPort()..
"$"..fmrhub:GetHubDescr().."$"..frmHub:GetMaxUsers().."$"..frmHub:GetMinShare().."$PtokaX$"..owneremail)
return 1
end
end

plop
Title:
Post by: PPK on 02 March, 2005, 00:49:12
Fixed version (thx Alexandros for report).
-- PtokaX Lua 5 version by PPK

owneremail = "PLACE_OWNER_EMAIL_HERE"

function UnknownArrival(curUser, sData)
--// simple $BotINFO implementation //--
if string.sub(sData, 1, 8) == "$BotINFO" then
local minshare = frmHub:GetMinShare()*1024*1024
curUser:SendData("$HubINFO "..frmHub:GetHubName().."$"..frmHub:GetHubAddress()..":"..frmHub:GetHubPort().."$"..frmHub:GetHubDescr()..
"$"..frmHub:GetMaxUsers().."$"..minshare.."$"..frmHub:GetMinSlots().."$"..frmHub:GetMaxHubs().."$PtokaX$"..owneremail)
return 1
end
end
Title:
Post by: Herodes on 02 March, 2005, 14:29:08
Wouldn't it help to "stitch" this in PtokaX ?
Title:
Post by: blackwings on 05 March, 2005, 06:14:46
what does this script really do ?(

And is the ownermail in the end if the sendData really needed ?(
Title:
Post by: bastya_elvtars on 05 March, 2005, 12:42:04
This registers the hub on hublist.org list when the pinger enters. Original version by Gadget. And the email is unneeded.
Title:
Post by: PPK on 05 March, 2005, 13:59:33
QuoteOriginally posted by blackwings
what does this script really do ?(

And is the ownermail in the end if the sendData really needed ?(
Check BotINFO/HubINFO (http://dcplusplus.sourceforge.net/wiki/index.php/BotINFO%20%26%20HubINFO%20commands)  command description  :]