Skip to content

Commit

Permalink
preview: try to send mod channel messages 4 seconds after joining, no…
Browse files Browse the repository at this point in the history
…t after loading mod
  • Loading branch information
nerzhul committed Sep 26, 2017
1 parent 9eb163a commit f7e57a0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions clientmods/preview/init.lua
Expand Up @@ -17,6 +17,12 @@ core.register_on_connect(function()
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)
end)

core.register_on_modchannel_message(function(channel, sender, message)
Expand Down Expand Up @@ -116,12 +122,6 @@ core.after(2, function()
preview_minimap()
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()
if core.ui.minimap then
core.ui.minimap:show()
Expand Down

0 comments on commit f7e57a0

Please sign in to comment.