aboutsummaryrefslogtreecommitdiff
path: root/games/minimal/mods/experimental/modchannels.lua
blob: 8fce6cfc46af063288d8742b316b8380d0f4f6df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--
-- Mod channels experimental handlers
--
local mod_channel = core.mod_channel_join("experimental_preview")

core.register_on_modchannel_message(function(channel, sender, message)
	print("[minimal][modchannels] Server received message `" .. message
			.. "` on channel `" .. channel .. "` from sender `" .. sender .. "`")

	if mod_channel:is_writeable() then
		mod_channel:send_all("experimental answers to preview")
		mod_channel:leave()
	end
end)

print("[minimal][modchannels] Code loaded!")