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

jrwr
New member
 
Posts: 3
Joined: Sat Jun 18, 2011 02:22

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

by jrwr » Sat Jun 18, 2011 06:30

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
Last edited by jrwr on Sat Jun 18, 2011 19:32, edited 1 time in total.
 

User avatar
Fishkilleur
Member
 
Posts: 29
Joined: Wed Apr 20, 2011 11:57

by Fishkilleur » Sat Jun 18, 2011 19:25

I added my server (FR), not always connected.
http://revolution.c4.fr
Last edited by Fishkilleur on Sat Jun 18, 2011 19:26, edited 1 time in total.
 

jrwr
New member
 
Posts: 3
Joined: Sat Jun 18, 2011 02:22

by jrwr » Sat Jun 18, 2011 19:34

dont forget, the script will auto remove if you do not submit the server ever 5 minutes
 

User avatar
Fishkilleur
Member
 
Posts: 29
Joined: Wed Apr 20, 2011 11:57

by Fishkilleur » Sat Jun 18, 2011 19:46

how do I do that?
 

marvalis
Member
 
Posts: 16
Joined: Mon Jun 20, 2011 13:15

by marvalis » Mon Jun 20, 2011 14:11

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.
 

Fisherman
Member
 
Posts: 10
Joined: Fri Apr 22, 2011 14:13

by Fisherman » Mon Jun 20, 2011 16:05

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.
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 6 guests

cron