Page 1 of 1

masterserver improvement: automatic server announce

PostPosted: Thu Feb 14, 2013 13:00
by proller
like in openttd game:
network masterserver announce:
if announce enabled in config (disabled by default)
server send to masterserver[s] on start and every 60-600s (on info change, or every max interval):
string hostname, //optional, if no - use senders ip
int port, //optional, if no = 30000
string version,
bool password protected,
int n of clients,
int server uptime, //seconds
int changed blocks,
string url homepage,
string url map
...?
maybe array of client names..
...?
via curl POST to masterserver/add , in json format
{"hostname":"mine.test.com", "version":"0.4.4", "password":"1", "clients":42, "uptime":1234}


masterserver:
recieve anonuces,
make static result list with servers reported last 1200 seconds
or generate by request
format: json like
[
{"ip":"1.2.3.4", "hostname":"mine.test.com", "version":"0.4.4", "password":1, "clients":42, "uptime":1234},
{"ip":"1.2.3.5", "hostname":"mine2.test.com", "version":"0.4.4", "password":0, "clients":43, "uptime":1234},
...
]
ip is message sender ip


client:
receive json from masterserver/list , parse, show in table


future:
clients ask servers about fresh info

PostPosted: Fri Feb 15, 2013 18:19
by proller

PostPosted: Sat Feb 16, 2013 04:22
by proller

PostPosted: Sat Feb 16, 2013 04:24
by lkjoel
Looks very interesting, but I'm not exactly clear on the use of it... could you clarify that? :)

PostPosted: Thu Feb 21, 2013 22:20
by proller
pushed to master.
to enable announce - update source, recompile, configure:
server_announce = 1

to use new server list on client - update, recompile, go to game - multiplayer - Show Public

or wait next release.

PostPosted: Fri Feb 22, 2013 16:15
by rubenwardy
It is a master server list.

When a server is started, I connects to the master list and adds its details there.

Clients can then see the server in the listing.

PostPosted: Fri Feb 22, 2013 16:17
by PilzAdam
proller, you could do some sort of documentation at http://dev.minetest.net/.