diff options
author | red-001 <red-001@outlook.ie> | 2018-01-21 17:27:27 +0000 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2018-01-21 18:27:27 +0100 |
commit | 49ff1d2ea8af6bf0e89fcab83522e3c55625b620 (patch) | |
tree | 0209962f1e759943d6e212a19e9cc58d71618abe /clientmods/preview | |
parent | 5dab7426451842793b183fbd961ad2ae83c8acbd (diff) | |
download | minetest-49ff1d2ea8af6bf0e89fcab83522e3c55625b620.tar.gz minetest-49ff1d2ea8af6bf0e89fcab83522e3c55625b620.tar.bz2 minetest-49ff1d2ea8af6bf0e89fcab83522e3c55625b620.zip |
[CSM] Remove `on_connect` callback (#6941)
Fixes #6939
Diffstat (limited to 'clientmods/preview')
-rw-r--r-- | clientmods/preview/init.lua | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/clientmods/preview/init.lua b/clientmods/preview/init.lua index a384fd6bf..223577876 100644 --- a/clientmods/preview/init.lua +++ b/clientmods/preview/init.lua @@ -7,21 +7,19 @@ dofile("preview:example.lua") core.register_on_shutdown(function() print("[PREVIEW] shutdown client") end) -local id = 0 -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) - mod_channel = core.mod_channel_join("experimental_preview") - - core.after(4, function() - if mod_channel:is_writeable() then - mod_channel:send_all("preview talk to experimental") - end - end) +local id = nil + +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) +mod_channel = core.mod_channel_join("experimental_preview") + +core.after(4, function() + if mod_channel:is_writeable() then + mod_channel:send_all("preview talk to experimental") + end end) core.after(1, function() |