mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
CSM: Fix documentation error for register_on_*_chat_messages (#5917)
This commit is contained in:
parent
312ca0382b
commit
44495ea719
5 changed files with 10 additions and 11 deletions
|
@ -53,7 +53,7 @@ bool ScriptApiClient::on_sending_message(const std::string &message)
|
|||
|
||||
// Get core.registered_on_chat_messages
|
||||
lua_getglobal(L, "core");
|
||||
lua_getfield(L, -1, "registered_on_sending_chat_messages");
|
||||
lua_getfield(L, -1, "registered_on_sending_chat_message");
|
||||
// Call callbacks
|
||||
lua_pushstring(L, message.c_str());
|
||||
runCallbacks(1, RUN_CALLBACKS_MODE_OR_SC);
|
||||
|
@ -67,7 +67,7 @@ bool ScriptApiClient::on_receiving_message(const std::string &message)
|
|||
|
||||
// Get core.registered_on_chat_messages
|
||||
lua_getglobal(L, "core");
|
||||
lua_getfield(L, -1, "registered_on_receiving_chat_messages");
|
||||
lua_getfield(L, -1, "registered_on_receiving_chat_message");
|
||||
// Call callbacks
|
||||
lua_pushstring(L, message.c_str());
|
||||
runCallbacks(1, RUN_CALLBACKS_MODE_OR_SC);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue