PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: Alexandros on 01 March, 2005, 17:42:13

Title: [LUA5] touble with botinfo script
Post by: Alexandros on 01 March, 2005, 17:42:13
i have this script in lua5 (modification from PPKs one):
owneremail = "alexx@gmail.com"
SHARE = 629145600
VERSION = "PtokaX 0.3.3.0"
MAXHUB = 10
MINSLOTS = 3
HubAddress = frmHub:GetHubAddress()..":"..frmHub:GetHubPort()

function UnknownArrival(curUser, sData)
--// simple $BotINFO implementation //--
if string.sub(sData, 1, 8) == "$BotINFO " then
urUser:SendData("$HubINFO "..frmHub:GetHubName().."$"..HubAddress.."$"..fmrhub:GetHubDescr().."$"..frmHub:GetMaxUsers().."$"..SHARE.."$"..MINSLOTS.."$"..frmHub:GetMaxHubs().."$"..VERSION.."$"..owneremail)
return 1
end
end

The {hublistpiger} enters, stay 2 minutes in my hub, go out and in hublist my hub is now listed as "timeout" anyone knows where the error is?
thanks
Title:
Post by: [UK]Madman on 01 March, 2005, 18:19:20
Id guess...


    if string.sub(sData, 1, 8) == "$BotINFO "  then

        curUser:SendData("$HubINFO "..frmHub:GetHubName().."$"..HubAddress.."$"..fmrhub:GetHubDescr().."$"..frmHub:GetMaxUsers().."$"..SHARE.."$"..MINSLOTS.."$"..frmHub:GetMaxHubs().."$"..VERSION.."$"..owneremail)


the $botinfo seems to have a space on the end inside the "'s

the curUser:SendData had a c missing
Title:
Post by: Alexandros on 01 March, 2005, 18:26:49
QuoteOriginally posted by [UK]Madman
Id guess...


    if string.sub(sData, 1, 8) == "$BotINFO "  then

        curUser:SendData("$HubINFO "..frmHub:GetHubName().."$"..HubAddress.."$"..fmrhub:GetHubDescr().."$"..frmHub:GetMaxUsers().."$"..SHARE.."$"..MINSLOTS.."$"..frmHub:GetMaxHubs().."$"..VERSION.."$"..owneremail)


the $botinfo seems to have a space on the end inside the "'s

the curUser:SendData had a c missing
that space is in the original script and  "C" is a copy/paste error, i have that C in my script.  :S
Title:
Post by: Typhoon on 01 March, 2005, 18:46:54
try without the extra space i use it without space in my script with no problems


Typhoon?
Title:
Post by: Alexandros on 01 March, 2005, 21:10:32
i'll try that way...any other sugestions?

thanks again
Title:
Post by: Alexandros on 02 March, 2005, 01:50:29
hi, is there something in the new version of ptokax that "dislikes" the $BotINFO command? i have this in debug

[21:34] {HubListPinger} (82.141.122.173) > $BotINFO {HubListPinger} //www.hublist.org hublist pinger for http://www.hublist.org/PublicHubList.config.bz2|
[21:34] x User removed: {HubListPinger} (Socket 4220)