summaryrefslogtreecommitdiff
path: root/games/minimal/mods/modchannels
diff options
context:
space:
mode:
authorWuzzy <wuzzy2@mail.ru>2020-05-24 15:46:26 +0200
committerGitHub <noreply@github.com>2020-05-24 14:46:26 +0100
commit6456aba73f0ef3f2fa7fd2b2a69cfdf8624afe23 (patch)
treef2bada583c6f4d3032f28b2627bf052174f0a847 /games/minimal/mods/modchannels
parenta9b74f4c3966ad38c2f9a97364d3fdda0e514c93 (diff)
downloadminetest-6456aba73f0ef3f2fa7fd2b2a69cfdf8624afe23.tar.gz
minetest-6456aba73f0ef3f2fa7fd2b2a69cfdf8624afe23.tar.bz2
minetest-6456aba73f0ef3f2fa7fd2b2a69cfdf8624afe23.zip
Replacement for Minimal Development Test (PR) (#9450)
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