diff options
author | Mattes D <github@xoft.cz> | 2014-08-21 16:55:39 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-08-21 16:55:39 +0200 |
commit | 326dd7e4c6baa6070d35a2a46ca20404c623c8e1 (patch) | |
tree | c87ad1a554656a97f706c067ee23956849be55a3 /src/Bindings | |
parent | Removed last remnant of cGroup. (diff) | |
download | cuberite-326dd7e4c6baa6070d35a2a46ca20404c623c8e1.tar cuberite-326dd7e4c6baa6070d35a2a46ca20404c623c8e1.tar.gz cuberite-326dd7e4c6baa6070d35a2a46ca20404c623c8e1.tar.bz2 cuberite-326dd7e4c6baa6070d35a2a46ca20404c623c8e1.tar.lz cuberite-326dd7e4c6baa6070d35a2a46ca20404c623c8e1.tar.xz cuberite-326dd7e4c6baa6070d35a2a46ca20404c623c8e1.tar.zst cuberite-326dd7e4c6baa6070d35a2a46ca20404c623c8e1.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Bindings/ManualBindings_RankManager.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Bindings/ManualBindings_RankManager.cpp b/src/Bindings/ManualBindings_RankManager.cpp index bc31ea687..5351c028d 100644 --- a/src/Bindings/ManualBindings_RankManager.cpp +++ b/src/Bindings/ManualBindings_RankManager.cpp @@ -717,6 +717,35 @@ static int tolua_cRankManager_RemovePermissionFromGroup(lua_State * L) +/** Binds cRankManager::RemovePlayerRank */ +static int tolua_cRankManager_RemovePlayerRank(lua_State * L) +{ + // function signature: + // cRankManager:RemovePlayerRank(PlayerUUID) + + cLuaState S(L); + if ( + !S.CheckParamUserTable(1, "cRankManager") || + !S.CheckParamString(2) || + !S.CheckParamEnd(3) + ) + { + return 0; + } + + // Get the params: + AString PlayerUUID; + S.GetStackValue(2, PlayerUUID); + + // Remove the player's rank: + cRoot::Get()->GetRankManager().RemovePlayerRank(PlayerUUID); + return 0; +} + + + + + /** Binds cRankManager::RemoveRank */ static int tolua_cRankManager_RemoveRank(lua_State * L) { @@ -900,6 +929,7 @@ void ManualBindings::BindRankManager(lua_State * tolua_S) tolua_function(tolua_S, "RemoveGroup", tolua_cRankManager_RemoveGroup); tolua_function(tolua_S, "RemoveGroupFromRank", tolua_cRankManager_RemoveGroupFromRank); tolua_function(tolua_S, "RemovePermissionFromGroup", tolua_cRankManager_RemovePermissionFromGroup); + tolua_function(tolua_S, "RemovePlayerRank", tolua_cRankManager_RemovePlayerRank); tolua_function(tolua_S, "RemoveRank", tolua_cRankManager_RemoveRank); tolua_function(tolua_S, "RenameGroup", tolua_cRankManager_RenameGroup); tolua_function(tolua_S, "RenameRank", tolua_cRankManager_RenameRank); |