advtrains stub
This commit is contained in:
parent
132e087783
commit
f10d5f5263
@ -1,5 +1,5 @@
|
|||||||
-- mapserver http bridge
|
-- mapserver http bridge
|
||||||
|
local has_advtrains = minetest.get_modpath("advtrains")
|
||||||
|
|
||||||
local function explode(sep, input)
|
local function explode(sep, input)
|
||||||
local t={}
|
local t={}
|
||||||
@ -20,8 +20,6 @@ local http, url, key
|
|||||||
|
|
||||||
function send_stats()
|
function send_stats()
|
||||||
|
|
||||||
-- send trains if 'advtrains' mod installed: advtrains.trains
|
|
||||||
|
|
||||||
local data = {
|
local data = {
|
||||||
time = minetest.get_timeofday() * 24000,
|
time = minetest.get_timeofday() * 24000,
|
||||||
uptime = minetest.get_server_uptime(),
|
uptime = minetest.get_server_uptime(),
|
||||||
@ -29,6 +27,11 @@ function send_stats()
|
|||||||
players = {}
|
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
|
for _, player in ipairs(minetest.get_connected_players()) do
|
||||||
local info = {
|
local info = {
|
||||||
name = player:get_player_name(),
|
name = player:get_player_name(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user