diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2017-07-15 09:28:10 +0200 |
---|---|---|
committer | Loic Blot <loic.blot@unix-experience.fr> | 2017-07-15 09:28:10 +0200 |
commit | 84aa84591183db08489cad4e5a26472dbd7050b2 (patch) | |
tree | e436d6089b03dc6f715202a4faff9227ae5cb408 /builtin/client | |
parent | fafa51202c3bd6e46a44eacbc7f42ef697835945 (diff) | |
download | minetest-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.lua | 12 |
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 |