aboutsummaryrefslogtreecommitdiff
path: root/builtin/client
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2017-07-15 09:28:10 +0200
committerLoic Blot <loic.blot@unix-experience.fr>2017-07-15 09:28:10 +0200
commit84aa84591183db08489cad4e5a26472dbd7050b2 (patch)
treee436d6089b03dc6f715202a4faff9227ae5cb408 /builtin/client
parentfafa51202c3bd6e46a44eacbc7f42ef697835945 (diff)
downloadminetest-84aa84591183db08489cad4e5a26472dbd7050b2.tar.gz
minetest-84aa84591183db08489cad4e5a26472dbd7050b2.tar.bz2
minetest-84aa84591183db08489cad4e5a26472dbd7050b2.zip
Revert "CSM: Revert "[CSM] Add send_chat_message and run_server_chatcommand""
This reverts commit bdac12761cd92960c3df83c932aa610f2322215f.
Diffstat (limited to 'builtin/client')
-rw-r--r--builtin/client/chatcommands.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/builtin/client/chatcommands.lua b/builtin/client/chatcommands.lua
index 20f98a293..ed43a6140 100644
--- a/builtin/client/chatcommands.lua
+++ b/builtin/client/chatcommands.lua
@@ -51,3 +51,15 @@ core.register_chatcommand("disconnect", {
core.disconnect()
end,
})
+
+core.register_chatcommand("clear_chat_queue", {
+ description = core.gettext("Clear the out chat queue"),
+ func = function(param)
+ core.clear_out_chat_queue()
+ return true, core.gettext("The out chat queue is now empty")
+ end,
+})
+
+function core.run_server_chatcommand(cmd, param)
+ core.send_chat_message("/" .. cmd .. " " .. param)
+end