Page 1 of 1

Server Listings, (Helped out a little too :) )

PostPosted: Sat Jun 18, 2011 06:30
by jrwr
I would like to see in game server listings,

I've even taken the time to make the master server list script

outputs to the client as CSV with \r\n line endings

SubmittedIP,SubmittedPort,SubmittedCountryCode,CountryCodeDetected,DetectedIP,Unix Timestamp,SaltedServerHash(Useless to the client),
(I should not that saltedserverhash is generated by the script and is used to look up the server to update its entry in the database)

The server submits heartbeats every 300 seconds or less, or the server is removed from the listing

the listing is here: http://jrwr.co.cc/minetest/masterserver/list.php

to submit a listing, its dead easy, just request this page (cURL comes to mind)

http://jrwr.co.cc/minetest/masterserver/submit.php?action=update&ip=$serverip&port=$serverport&con=$2lettercountycode
(if county code is blank, will replace with detected county code, county code has to be UPPERCASE to be submitted without replacement)

at this time, it will output its CSV format that was submitted to the backend, this can be used for getting information to the server,

Added Error codes, I would just run a check for the first entry to see if "update" was there, if not the script error'd out at you, This script will ping the submitted IP for a Valid server, it must be a minetest server or it will fail, also if submitted ip is put to 127.1.1.13 the script will auto replace the submitted IP to the detected IP allowing servers to detect its outside IPs and if its ping-able

csv list for output of the submit is error/action,submittedip,submittedport,submittedcountrycode,detectedip,detectedcountycode,unixtimestamp,iphash,ping1,ping2,extraerrorcodes

Everything else information wise should be handled by pinging the server and getting its info

Edit: added server ping to prevent spam

PostPosted: Sat Jun 18, 2011 19:25
by Fishkilleur
I added my server (FR), not always connected.
http://revolution.c4.fr

PostPosted: Sat Jun 18, 2011 19:34
by jrwr
dont forget, the script will auto remove if you do not submit the server ever 5 minutes

PostPosted: Sat Jun 18, 2011 19:46
by Fishkilleur
how do I do that?

PostPosted: Mon Jun 20, 2011 14:11
by marvalis
Wouldn't it make more sense to have the servers send a 'heartbeat' to the server list? This way, the server list always knows when a server comes online again. All it need to do is listen who is out there and remove the silent ones (missed a heartbeat? send a request to the server. No answer? Try again. No answer? Remove it from the list until the server says hello again and gives you its heartbeat.

PostPosted: Mon Jun 20, 2011 16:05
by Fisherman
your web service doesn't allow dns names instead of an IP address. I sometimes run a server at home but I have a dynamic IP address so I use a dynamic dns service.