]> git.lizzy.rs Git - minetest.git/commitdiff
DevTest: Move chat command logging to separate mod
authorWuzzy <Wuzzy@disroot.org>
Sat, 8 Oct 2022 15:34:55 +0000 (17:34 +0200)
committersfan5 <sfan5@live.de>
Sun, 23 Oct 2022 19:58:56 +0000 (21:58 +0200)
games/devtest/mods/experimental/commands.lua
games/devtest/mods/log/init.lua [new file with mode: 0644]
games/devtest/mods/log/mod.conf [new file with mode: 0644]

index 4cec2e687685bb56633ebe1f8ff774cadea6e11e..fc09be954dea3f3f2622f7c93755e4b18ac487d5 100644 (file)
@@ -288,7 +288,3 @@ minetest.register_chatcommand("test_place_nodes", {
                return true, "Emerging area …"
        end,
 })
-
-core.register_on_chatcommand(function(name, command, params)
-       minetest.log("action", "caught command '"..command.."', issued by '"..name.."'. Parameters: '"..params.."'")
-end)
diff --git a/games/devtest/mods/log/init.lua b/games/devtest/mods/log/init.lua
new file mode 100644 (file)
index 0000000..4102bca
--- /dev/null
@@ -0,0 +1,3 @@
+minetest.register_on_chatcommand(function(name, command, params)
+       minetest.log("action", "[devtest] Caught command '"..command.."', issued by '"..name.."'. Parameters: '"..params.."'")
+end)
diff --git a/games/devtest/mods/log/mod.conf b/games/devtest/mods/log/mod.conf
new file mode 100644 (file)
index 0000000..d2f37b9
--- /dev/null
@@ -0,0 +1,2 @@
+name = log
+description = Log DevTest-related actions