summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-08-11 16:06:40 +0200
committermadmaxoft <github@xoft.cz>2014-08-11 16:06:40 +0200
commite0b45c189328d668f5177e529abe99387fc49cf3 (patch)
tree91e4884ec75654c4cb63ffcdce89f7fd67abc96b /src
parentMerge branch 'master' into Ranks (diff)
downloadcuberite-e0b45c189328d668f5177e529abe99387fc49cf3.tar
cuberite-e0b45c189328d668f5177e529abe99387fc49cf3.tar.gz
cuberite-e0b45c189328d668f5177e529abe99387fc49cf3.tar.bz2
cuberite-e0b45c189328d668f5177e529abe99387fc49cf3.tar.lz
cuberite-e0b45c189328d668f5177e529abe99387fc49cf3.tar.xz
cuberite-e0b45c189328d668f5177e529abe99387fc49cf3.tar.zst
cuberite-e0b45c189328d668f5177e529abe99387fc49cf3.zip
Diffstat (limited to 'src')
-rw-r--r--src/Bindings/ManualBindings_RankManager.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Bindings/ManualBindings_RankManager.cpp b/src/Bindings/ManualBindings_RankManager.cpp
index d17672dcb..b109b0097 100644
--- a/src/Bindings/ManualBindings_RankManager.cpp
+++ b/src/Bindings/ManualBindings_RankManager.cpp
@@ -57,8 +57,8 @@ static int tolua_cRankManager_AddGroupToRank(lua_State * L)
S.GetStackValues(2, GroupName, RankName);
// Add the group to the rank:
- cRoot::Get()->GetRankManager().AddGroupToRank(GroupName, RankName);
- return 0;
+ S.Push(cRoot::Get()->GetRankManager().AddGroupToRank(GroupName, RankName));
+ return 1;
}
@@ -287,7 +287,10 @@ static int tolua_cRankManager_GetPlayerMsgVisuals(lua_State * L)
// Get the permissions:
AString MsgPrefix, MsgSuffix, MsgNameColorCode;
- cRoot::Get()->GetRankManager().GetPlayerMsgVisuals(PlayerUUID, MsgPrefix, MsgSuffix, MsgNameColorCode);
+ if (!cRoot::Get()->GetRankManager().GetPlayerMsgVisuals(PlayerUUID, MsgPrefix, MsgSuffix, MsgNameColorCode))
+ {
+ return 0;
+ }
// Push the results:
S.Push(MsgPrefix);