1
0
Fork 0
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:
DS 2017-06-09 15:48:04 +02:00 committed by Loïc Blot
parent 312ca0382b
commit 44495ea719
5 changed files with 10 additions and 11 deletions

View file

@ -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);