aboutsummaryrefslogtreecommitdiff
path: root/src/script/cpp_api/s_player.h
diff options
context:
space:
mode:
authorsorcerykid <rkrause@inbox.com>2020-05-23 06:24:06 -0500
committerSmallJoker <mk939@ymail.com>2020-05-23 13:25:29 +0200
commit15ba75e4cf1d1b8ceaa9d8ce33dcfdd7dbe80741 (patch)
tree482763407643cd776af9bd2c79e241969bbc644f /src/script/cpp_api/s_player.h
parent037422fdba9a47bd538480988fbf8aad67d66c85 (diff)
downloadminetest-15ba75e4cf1d1b8ceaa9d8ce33dcfdd7dbe80741.tar.gz
minetest-15ba75e4cf1d1b8ceaa9d8ce33dcfdd7dbe80741.tar.bz2
minetest-15ba75e4cf1d1b8ceaa9d8ce33dcfdd7dbe80741.zip
Add on_authplayer callback and 'last_login' to on_joinplayer (#9574)
Replace on_auth_fail callback with more versatile on_authplayer Better clarify account login process in Lua API documentation Change initial timestamp for newly registered accounts to -1
Diffstat (limited to 'src/script/cpp_api/s_player.h')
-rw-r--r--src/script/cpp_api/s_player.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/cpp_api/s_player.h b/src/script/cpp_api/s_player.h
index 7ca3d8f30..a337f975b 100644
--- a/src/script/cpp_api/s_player.h
+++ b/src/script/cpp_api/s_player.h
@@ -41,7 +41,7 @@ public:
bool on_prejoinplayer(const std::string &name, const std::string &ip,
std::string *reason);
bool can_bypass_userlimit(const std::string &name, const std::string &ip);
- void on_joinplayer(ServerActiveObject *player);
+ void on_joinplayer(ServerActiveObject *player, s64 last_login);
void on_leaveplayer(ServerActiveObject *player, bool timeout);
void on_cheat(ServerActiveObject *player, const std::string &cheat_type);
bool on_punchplayer(ServerActiveObject *player, ServerActiveObject *hitter,
@@ -51,7 +51,7 @@ public:
const PlayerHPChangeReason &reason);
void on_playerReceiveFields(ServerActiveObject *player,
const std::string &formname, const StringMap &fields);
- void on_auth_failure(const std::string &name, const std::string &ip);
+ void on_authplayer(const std::string &name, const std::string &ip, bool is_success);
// Player inventory callbacks
// Return number of accepted items to be moved