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

minetest.register_on_modchannel_message(function(channel, sender, message)
	minetest.log("action", "[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)