1
0
forked from MTSR/mapserver

advtrains stub

This commit is contained in:
NatureFreshMilk 2019-02-08 12:37:38 +01:00
parent 132e087783
commit f10d5f5263

View File

@ -1,5 +1,5 @@
-- mapserver http bridge
local has_advtrains = minetest.get_modpath("advtrains")
local function explode(sep, input)
local t={}
@ -20,8 +20,6 @@ local http, url, key
function send_stats()
-- send trains if 'advtrains' mod installed: advtrains.trains
local data = {
time = minetest.get_timeofday() * 24000,
uptime = minetest.get_server_uptime(),
@ -29,6 +27,11 @@ function send_stats()
players = {}
}
if has_advtrains then
-- send trains if 'advtrains' mod installed
data.trains = advtrains.trains
end
for _, player in ipairs(minetest.get_connected_players()) do
local info = {
name = player:get_player_name(),