]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - builtin/client/chatcommands.lua
Lua API: Add register_on_chatcommand to SSM and CSM (#7862)
[dragonfireclient.git] / builtin / client / chatcommands.lua
index 5cb1b40bb34858a10dbaae94d9e1c70dfb7bc65f..0e8d4dd030cbbc3e4df9269162f0f74c6ceb5eae 100644 (file)
@@ -23,6 +23,11 @@ core.register_on_sending_chat_message(function(message)
                return true
        end
 
+       -- Run core.registered_on_chatcommand callbacks.
+       if core.run_callbacks(core.registered_on_chatcommand, 5, cmd, param) then
+               return true
+       end
+
        local cmd_def = core.registered_chatcommands[cmd]
        if cmd_def then
                core.set_last_run_mod(cmd_def.mod_origin)