aboutsummaryrefslogtreecommitdiff
path: root/po/pl
Commit message (Expand)AuthorAge
* Footsteps without view bobbing (#5645)Louis Pearson2017-04-25
* Translated using Weblate (Polish)Jakub Mendel2017-04-06
* Translated using Weblate (Polish)Andrzej Redlarski2017-04-06
* Run updatepo.shest312016-12-14
* Translated using Weblate (Polish)Jakub Mendel2016-12-14
* Translated using Weblate (Polish)red-0012016-12-14
* Translated using Weblate (Polish)nedzadarek2016-12-14
* Run updatepo.shest312016-08-30
* Translated using Weblate (Polish)Mateusz Mendel2016-08-30
* Translated using Weblate (Polish)Jakub Mendel2016-08-30
* Run updatepo.shest312016-07-12
* Run updatepo.shest312016-05-05
* Translated using Weblate (Polish)red-0012016-03-25
* Update po files, minetest.conf.example and settings_translation_file.cppest312016-02-27
* Translated using Weblate (Polish)Amadeo2016-02-27
* Translated using Weblate (Polish)Maciej Kasatkin2015-11-15
* Translated using Weblate (Polish)Jarosław Maciejewski2015-11-15
* Run util/updatepo.shest312015-11-08
* Run updatepo.shest312015-10-24
* Run updatepo.shest312015-09-12
* Run updatepo.shest312015-07-17
* Revert "Update Russian translation"Kahrl2014-12-13
* Update po filesShadowNinja2014-12-12
* Run updatepo.shPilzAdam2013-11-23
* Translated using Weblate (Polish)Maciej Kasatkin2013-11-23
* Run updatepo.shIlya Zhuravlev2013-09-08
* Run util/updatepo.shPilzAdam2013-08-25
* Fix i18n of some strings.arsdragonfly2013-07-02
* Update po filesPilzAdam2013-05-13
* Translated using Weblate (Polish)Daniel Ziolkowski2013-04-22
* Translated using Weblate (Polish)Dêivan Ortiz Munhoz2013-04-03
* Translated using Weblate (Polish)Maciej Kasatkin2013-04-01
* Update po filesPilzAdam2013-03-30
* Translated using Weblate (Polish)Maciej Kasatkin2013-02-22
* Merge remote branch 'origin/master'Weblate2013-02-02
|\
| * Translate key functions in key change menuPilzAdam2013-01-30
* | Translated using Weblate (Polish)Maciej Kasatkin2013-02-02
* | Translated using Weblate (Polish)Maciej Kasatkin2013-01-30
|/
* Add Spanish, Russian, Polish and Romanian languages.Ilya Zhuravlev2013-01-29
E); std::string password; bool found = getstringfield(L, -1, "password", password); if (!found) throw LuaError("Authentication handler didn't return password"); if (dst_password) *dst_password = password; lua_getfield(L, -1, "privileges"); if (!lua_istable(L, -1)) throw LuaError("Authentication handler didn't return privilege table"); if (dst_privs) readPrivileges(-1, *dst_privs); lua_pop(L, 1); return true; } void ScriptApiServer::getAuthHandler() { lua_State *L = getStack(); 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"); } setOriginFromTable(-1); lua_remove(L, -2); // Remove core if (lua_type(L, -1) != LUA_TTABLE) throw LuaError("Authentication handler table not valid"); } void ScriptApiServer::readPrivileges(int index, std::set<std::string> &result) { lua_State *L = getStack(); result.clear(); lua_pushnil(L); if (index < 0) index -= 1; while (lua_next(L, index) != 0) { // key at index -2 and value at index -1 std::string key = luaL_checkstring(L, -2); bool value = readParam<bool>(L, -1); if (value) result.insert(key); // removes value, keeps key for next iteration lua_pop(L, 1); } } void ScriptApiServer::createAuth(const std::string &playername, const std::string &password) { SCRIPTAPI_PRECHECKHEADER int error_handler = PUSH_ERROR_HANDLER(L); getAuthHandler(); lua_getfield(L, -1, "create_auth"); lua_remove(L, -2); // Remove auth handler if (lua_type(L, -1) != LUA_TFUNCTION) throw LuaError("Authentication handler missing create_auth"); lua_pushstring(L, playername.c_str()); lua_pushstring(L, password.c_str()); PCALL_RES(lua_pcall(L, 2, 0, error_handler)); lua_pop(L, 1); // Pop error handler } bool ScriptApiServer::setPassword(const std::string &playername, const std::string &password) { SCRIPTAPI_PRECHECKHEADER int error_handler = PUSH_ERROR_HANDLER(L); getAuthHandler(); lua_getfield(L, -1, "set_password"); lua_remove(L, -2); // Remove auth handler if (lua_type(L, -1) != LUA_TFUNCTION) throw LuaError("Authentication handler missing set_password"); lua_pushstring(L, playername.c_str()); lua_pushstring(L, password.c_str()); PCALL_RES(lua_pcall(L, 2, 1, error_handler)); lua_remove(L, error_handler); return lua_toboolean(L, -1); } bool ScriptApiServer::on_chat_message(const std::string &name, const std::string &message) { SCRIPTAPI_PRECHECKHEADER // 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()); lua_pushstring(L, message.c_str()); runCallbacks(2, RUN_CALLBACKS_MODE_OR_SC); return readParam<bool>(L, -1); } void ScriptApiServer::on_mods_loaded() { SCRIPTAPI_PRECHECKHEADER // Get registered shutdown hooks lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_mods_loaded"); // Call callbacks runCallbacks(0, RUN_CALLBACKS_MODE_FIRST); } void ScriptApiServer::on_shutdown() { SCRIPTAPI_PRECHECKHEADER // Get registered shutdown hooks lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_shutdown"); // Call callbacks runCallbacks(0, RUN_CALLBACKS_MODE_FIRST); }