From c4359ff65cd8e4e754442b9f2ef7051a8eaa4241 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Sun, 27 Apr 2014 21:02:48 -0400 Subject: Use "core" namespace internally --- src/script/cpp_api/s_server.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/script/cpp_api/s_server.cpp') diff --git a/src/script/cpp_api/s_server.cpp b/src/script/cpp_api/s_server.cpp index 7d21f968b..21fe164aa 100644 --- a/src/script/cpp_api/s_server.cpp +++ b/src/script/cpp_api/s_server.cpp @@ -62,13 +62,13 @@ void ScriptApiServer::getAuthHandler() { lua_State *L = getStack(); - lua_getglobal(L, "minetest"); + lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_auth_handler"); if (lua_isnil(L, -1)){ lua_pop(L, 1); lua_getfield(L, -1, "builtin_auth_handler"); } - lua_remove(L, -2); // Remove minetest + lua_remove(L, -2); // Remove core if (lua_type(L, -1) != LUA_TTABLE) throw LuaError("Authentication handler table not valid"); } @@ -130,8 +130,8 @@ bool ScriptApiServer::on_chat_message(const std::string &name, { SCRIPTAPI_PRECHECKHEADER - // Get minetest.registered_on_chat_messages - lua_getglobal(L, "minetest"); + // Get core.registered_on_chat_messages + lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_chat_messages"); // Call callbacks lua_pushstring(L, name.c_str()); @@ -146,7 +146,7 @@ void ScriptApiServer::on_shutdown() SCRIPTAPI_PRECHECKHEADER // Get registered shutdown hooks - lua_getglobal(L, "minetest"); + lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_shutdown"); // Call callbacks script_run_callbacks(L, 0, RUN_CALLBACKS_MODE_FIRST); -- cgit v1.2.3