aboutsummaryrefslogtreecommitdiff
path: root/clientmods/preview/init.lua
diff options
context:
space:
mode:
authorred-001 <red-001@outlook.ie>2017-04-19 14:16:54 +0100
committerparamat <mat.gregory@virginmedia.com>2017-05-04 04:25:45 +0100
commitae0d8f74d747fab2fbe5b4553818e0f938e3289d (patch)
treeddbb434b4a7c9b1300d6e0503b3fd70f391c6ff5 /clientmods/preview/init.lua
parent468eeb618e9abbff2f04f4635eb89a8f684d71ae (diff)
downloadminetest-ae0d8f74d747fab2fbe5b4553818e0f938e3289d.tar.gz
minetest-ae0d8f74d747fab2fbe5b4553818e0f938e3289d.tar.bz2
minetest-ae0d8f74d747fab2fbe5b4553818e0f938e3289d.zip
Add function to get server info.
Diffstat (limited to 'clientmods/preview/init.lua')
-rw-r--r--clientmods/preview/init.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/clientmods/preview/init.lua b/clientmods/preview/init.lua
index 255c0b83f..fb606b3f4 100644
--- a/clientmods/preview/init.lua
+++ b/clientmods/preview/init.lua
@@ -8,6 +8,11 @@ end)
core.register_on_connect(function()
print("[PREVIEW] Player connection completed")
+ local server_info = core.get_server_info()
+ print("Server version: " .. server_info.protocol_version)
+ print("Server ip: " .. server_info.ip)
+ print("Server address: " .. server_info.address)
+ print("Server port: " .. server_info.port)
end)
core.register_on_placenode(function(pointed_thing, node)
@@ -80,7 +85,6 @@ core.after(2, function()
print("[PREVIEW] loaded " .. modname .. " mod")
modstorage:set_string("current_mod", modname)
print(modstorage:get_string("current_mod"))
- print("Server version:" .. core.get_protocol_version())
preview_minimap()
end)