1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Much better API for auth.{cpp, h}

* No function overloading
* Adhere coding style and with method names following
  lowercase_underscore_style
* Use std::string in external API, handling these is
  much more fun
This commit is contained in:
est31 2016-03-09 03:12:22 +01:00
parent bb2ee54d3b
commit e0151d1054
5 changed files with 112 additions and 103 deletions

View file

@ -251,7 +251,7 @@ int ModApiUtil::l_get_password_hash(lua_State *L)
NO_MAP_LOCK_REQUIRED;
std::string name = luaL_checkstring(L, 1);
std::string raw_password = luaL_checkstring(L, 2);
std::string hash = translatePassword(name, raw_password);
std::string hash = translate_password(name, raw_password);
lua_pushstring(L, hash.c_str());
return 1;
}