preview: try to send mod channel messages 4 seconds after joining, not after loading mod

This commit is contained in:
Loic Blot 2017-09-26 08:31:56 +02:00
parent 9eb163ab4f
commit f7e57a0d20
No known key found for this signature in database
GPG Key ID: EFAA458E8C153987

@ -17,6 +17,12 @@ core.register_on_connect(function()
print("Server port: " .. server_info.port) print("Server port: " .. server_info.port)
mod_channel = core.mod_channel_join("experimental_preview") 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)
end) end)
core.register_on_modchannel_message(function(channel, sender, message) core.register_on_modchannel_message(function(channel, sender, message)
@ -116,12 +122,6 @@ core.after(2, function()
preview_minimap() preview_minimap()
end) end)
core.after(4, function()
if mod_channel:is_writeable() then
mod_channel:send_all("preview talk to experimental")
end
end)
core.after(5, function() core.after(5, function()
if core.ui.minimap then if core.ui.minimap then
core.ui.minimap:show() core.ui.minimap:show()