forked from MTSR/mapserver
advtrains stub
This commit is contained in:
parent
132e087783
commit
f10d5f5263
@ -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(),
|
||||
|
Loading…
Reference in New Issue
Block a user