aboutsummaryrefslogtreecommitdiff
path: root/games/minimal/mods/modchannels
diff options
context:
space:
mode:
Diffstat (limited to 'games/minimal/mods/modchannels')
-rw-r--r--games/minimal/mods/modchannels/init.lua14
-rw-r--r--games/minimal/mods/modchannels/mod.conf2
2 files changed, 16 insertions, 0 deletions
diff --git a/games/minimal/mods/modchannels/init.lua b/games/minimal/mods/modchannels/init.lua
new file mode 100644
index 000000000..ee925f09b
--- /dev/null
+++ b/games/minimal/mods/modchannels/init.lua
@@ -0,0 +1,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)
diff --git a/games/minimal/mods/modchannels/mod.conf b/games/minimal/mods/modchannels/mod.conf
new file mode 100644
index 000000000..7c13aadfb
--- /dev/null
+++ b/games/minimal/mods/modchannels/mod.conf
@@ -0,0 +1,2 @@
+name = modchannels
+description = Add experimental mod channel handlers