2014-08-08 17:12:22 -04:00
|
|
|
|
|
|
|
// ManualBindings_RankManager.cpp
|
|
|
|
|
|
|
|
// Implements the cRankManager Lua bindings
|
|
|
|
|
|
|
|
#include "Globals.h"
|
|
|
|
#include "ManualBindings.h"
|
|
|
|
#include "tolua++/include/tolua++.h"
|
|
|
|
#include "LuaState.h"
|
2018-08-28 20:51:25 -04:00
|
|
|
#include "../Root.h"
|
|
|
|
#include "../UUID.h"
|
2014-08-08 17:12:22 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Binds cRankManager::AddGroup */
|
|
|
|
static int tolua_cRankManager_AddGroup(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
|
|
|
// cRankManager:AddGroup(GroupName)
|
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamString(2) ||
|
|
|
|
!S.CheckParamEnd(3)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Read the params:
|
|
|
|
AString GroupName;
|
|
|
|
S.GetStackValue(2, GroupName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Add the group:
|
2014-10-18 14:55:01 -04:00
|
|
|
cRoot::Get()->GetRankManager()->AddGroup(GroupName);
|
2014-08-08 17:12:22 -04:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-23 11:56:23 -04:00
|
|
|
/** Binds cRankManager::AddGroupToRank */
|
2014-08-08 17:12:22 -04:00
|
|
|
static int tolua_cRankManager_AddGroupToRank(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
|
|
|
// cRankManager:AddGroupToRank(GroupName, RankName) -> bool
|
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamString(2, 3) ||
|
|
|
|
!S.CheckParamEnd(4)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Read the params:
|
|
|
|
AString GroupName, RankName;
|
|
|
|
S.GetStackValues(2, GroupName, RankName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Add the group to the rank:
|
2014-10-18 14:55:01 -04:00
|
|
|
S.Push(cRoot::Get()->GetRankManager()->AddGroupToRank(GroupName, RankName));
|
2014-08-11 10:06:40 -04:00
|
|
|
return 1;
|
2014-08-08 17:12:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Binds cRankManager::AddPermissionToGroup */
|
|
|
|
static int tolua_cRankManager_AddPermissionToGroup(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
|
|
|
// cRankManager:AddPermissionToGroup(Permission, GroupName) -> bool
|
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamString(2, 3) ||
|
|
|
|
!S.CheckParamEnd(4)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Read the params:
|
|
|
|
AString GroupName, Permission;
|
|
|
|
S.GetStackValues(2, Permission, GroupName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Add the group to the rank:
|
2014-10-18 14:55:01 -04:00
|
|
|
S.Push(cRoot::Get()->GetRankManager()->AddPermissionToGroup(Permission, GroupName));
|
2014-08-20 11:56:30 -04:00
|
|
|
return 1;
|
2014-08-08 17:12:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-10-06 15:24:31 -04:00
|
|
|
/** Binds cRankManager::AddRank */
|
|
|
|
static int tolua_cRankManager_AddRank(lua_State * L)
|
2015-04-25 15:05:35 -04:00
|
|
|
{
|
|
|
|
// Function signature:
|
2016-10-06 15:24:31 -04:00
|
|
|
// cRankManager:AddRank(RankName)
|
2015-04-25 15:05:35 -04:00
|
|
|
|
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
2016-10-06 15:24:31 -04:00
|
|
|
!S.CheckParamString(2, 5) ||
|
|
|
|
!S.CheckParamEnd(6)
|
2015-04-25 15:05:35 -04:00
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
// Read the params:
|
2016-10-06 15:24:31 -04:00
|
|
|
AString RankName, MsgPrefix, MsgSuffix, MsgNameColorCode;
|
|
|
|
S.GetStackValues(2, RankName, MsgPrefix, MsgSuffix, MsgNameColorCode);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2016-10-06 15:24:31 -04:00
|
|
|
// Add the rank:
|
|
|
|
cRoot::Get()->GetRankManager()->AddRank(RankName, MsgPrefix, MsgSuffix, MsgNameColorCode);
|
|
|
|
return 0;
|
2015-04-25 15:05:35 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-10-06 15:24:31 -04:00
|
|
|
/** Binds cRankManager::AddRestrictionToGroup */
|
|
|
|
static int tolua_cRankManager_AddRestrictionToGroup(lua_State * L)
|
2014-08-08 17:12:22 -04:00
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2016-10-06 15:24:31 -04:00
|
|
|
// cRankManager:AddRestrictionToGroup(Restriction, GroupName) -> bool
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
2016-10-06 15:24:31 -04:00
|
|
|
!S.CheckParamString(2, 3) ||
|
|
|
|
!S.CheckParamEnd(4)
|
2014-08-08 17:12:22 -04:00
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Read the params:
|
2016-10-06 15:24:31 -04:00
|
|
|
AString GroupName, Restriction;
|
|
|
|
S.GetStackValues(2, Restriction, GroupName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2016-10-06 15:24:31 -04:00
|
|
|
// Add the group to the rank:
|
|
|
|
S.Push(cRoot::Get()->GetRankManager()->AddRestrictionToGroup(Restriction, GroupName));
|
|
|
|
return 1;
|
2014-08-08 17:12:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-28 09:16:11 -04:00
|
|
|
/** Binds cRankManager::ClearPlayerRanks */
|
|
|
|
static int tolua_cRankManager_ClearPlayerRanks(lua_State * L)
|
|
|
|
{
|
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamEnd(2)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Remove all players:
|
2014-10-18 14:55:01 -04:00
|
|
|
cRoot::Get()->GetRankManager()->ClearPlayerRanks();
|
2014-09-28 09:16:11 -04:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
/** Binds cRankManager::GetAllGroups */
|
|
|
|
static int tolua_cRankManager_GetAllGroups(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-08 17:12:22 -04:00
|
|
|
// cRankManager:GetAllGroups() -> arraytable of GroupNames
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamEnd(2)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the groups:
|
2014-10-18 14:55:01 -04:00
|
|
|
AStringVector Groups = cRoot::Get()->GetRankManager()->GetAllGroups();
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Push the results:
|
|
|
|
S.Push(Groups);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Binds cRankManager::GetAllPermissions */
|
|
|
|
static int tolua_cRankManager_GetAllPermissions(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-08 17:12:22 -04:00
|
|
|
// cRankManager:GetAllPermissions() -> arraytable of Permissions
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamEnd(2)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the permissions:
|
2014-10-18 14:55:01 -04:00
|
|
|
AStringVector Permissions = cRoot::Get()->GetRankManager()->GetAllPermissions();
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Push the results:
|
|
|
|
S.Push(Permissions);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-10-06 15:24:31 -04:00
|
|
|
/** Binds cRankManager::GetAllPermissionsRestrictions */
|
|
|
|
static int tolua_cRankManager_GetAllPermissionsRestrictions(lua_State * L)
|
2015-04-25 15:05:35 -04:00
|
|
|
{
|
|
|
|
// Function signature:
|
2016-10-06 15:24:31 -04:00
|
|
|
// cRankManager:GetAllPermissionsRestrictions() -> arraytable of Permissions and Restrictions together
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamEnd(2)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
// Push the results:
|
2016-10-06 15:24:31 -04:00
|
|
|
S.Push(cRoot::Get()->GetRankManager()->GetAllPermissionsRestrictions());
|
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-10-06 15:24:31 -04:00
|
|
|
/** Binds cRankManager::GetAllPlayerUUIDs */
|
|
|
|
static int tolua_cRankManager_GetAllPlayerUUIDs(lua_State * L)
|
2015-04-25 15:05:35 -04:00
|
|
|
{
|
|
|
|
// Function signature:
|
2016-10-06 15:24:31 -04:00
|
|
|
// cRankManager:GetAllPlayerUUIDs() -> arraytable of Player UUID's
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
2017-08-25 08:43:18 -04:00
|
|
|
!S.CheckParamStaticSelf("cRankManager") ||
|
2015-04-25 15:05:35 -04:00
|
|
|
!S.CheckParamEnd(2)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2016-10-06 15:24:31 -04:00
|
|
|
// Get the player uuid's:
|
2017-08-25 08:43:18 -04:00
|
|
|
std::vector<cUUID> Players = cRoot::Get()->GetRankManager()->GetAllPlayerUUIDs();
|
|
|
|
|
|
|
|
// Convert to string UUIDs
|
|
|
|
std::vector<AString> StrUUIDs;
|
|
|
|
StrUUIDs.reserve(Players.size());
|
|
|
|
for (const auto & UUID : Players)
|
|
|
|
{
|
|
|
|
StrUUIDs.push_back(UUID.ToShortString());
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
// Push the results:
|
2017-08-25 08:43:18 -04:00
|
|
|
S.Push(StrUUIDs);
|
2015-04-25 15:05:35 -04:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-10-06 15:24:31 -04:00
|
|
|
/** Binds cRankManager::GetAllRanks */
|
|
|
|
static int tolua_cRankManager_GetAllRanks(lua_State * L)
|
2014-09-27 20:17:32 -04:00
|
|
|
{
|
|
|
|
// Function signature:
|
2016-10-06 15:24:31 -04:00
|
|
|
// cRankManager:GetAllRanks() -> arraytable of RankNames
|
2014-09-27 20:17:32 -04:00
|
|
|
|
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamEnd(2)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Push the results:
|
2016-10-06 15:24:31 -04:00
|
|
|
S.Push(cRoot::Get()->GetRankManager()->GetAllRanks());
|
2014-09-27 20:17:32 -04:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-10-06 15:24:31 -04:00
|
|
|
/** Binds cRankManager::GetAllRestrictions */
|
|
|
|
static int tolua_cRankManager_GetAllRestrictions(lua_State * L)
|
2014-08-08 17:12:22 -04:00
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2016-10-06 15:24:31 -04:00
|
|
|
// cRankManager:GetAllRestrictions() -> arraytable of Restrictions
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamEnd(2)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Push the results:
|
2016-10-06 15:24:31 -04:00
|
|
|
S.Push(cRoot::Get()->GetRankManager()->GetAllRestrictions());
|
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-24 14:05:28 -04:00
|
|
|
/** Binds cRankManager::GetDefaultRank */
|
|
|
|
static int tolua_cRankManager_GetDefaultRank(lua_State * L)
|
|
|
|
{
|
|
|
|
// Function signature:
|
|
|
|
// cRankManager:GetDefaultRank() -> string
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-24 14:05:28 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamEnd(2)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-24 14:05:28 -04:00
|
|
|
// Return the rank name:
|
2014-10-18 14:55:01 -04:00
|
|
|
S.Push(cRoot::Get()->GetRankManager()->GetDefaultRank());
|
2014-08-24 14:05:28 -04:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
/** Binds cRankManager::GetGroupPermissions */
|
|
|
|
static int tolua_cRankManager_GetGroupPermissions(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-08 17:12:22 -04:00
|
|
|
// cRankManager:GetGroupPermissions(GroupName) -> arraytable of permissions
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamString(2) ||
|
|
|
|
!S.CheckParamEnd(3)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the params:
|
|
|
|
AString GroupName;
|
|
|
|
S.GetStackValue(2, GroupName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the permissions:
|
2014-10-18 14:55:01 -04:00
|
|
|
AStringVector Permissions = cRoot::Get()->GetRankManager()->GetGroupPermissions(GroupName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Push the results:
|
|
|
|
S.Push(Permissions);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
/** Binds cRankManager::GetGroupRestrictions */
|
|
|
|
static int tolua_cRankManager_GetGroupRestrictions(lua_State * L)
|
|
|
|
{
|
|
|
|
// Function signature:
|
|
|
|
// cRankManager:GetGroupRestrictions(GroupName) -> arraytable of restrictions
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamString(2) ||
|
|
|
|
!S.CheckParamEnd(3)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
// Get the params:
|
|
|
|
AString GroupName;
|
|
|
|
S.GetStackValue(2, GroupName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
// Get the restrictions:
|
|
|
|
AStringVector Restrictions = cRoot::Get()->GetRankManager()->GetGroupRestrictions(GroupName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
// Push the results:
|
|
|
|
S.Push(Restrictions);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
/** Binds cRankManager::GetPlayerGroups */
|
|
|
|
static int tolua_cRankManager_GetPlayerGroups(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-08 17:12:22 -04:00
|
|
|
// cRankManager:GetPlayerGroups(PlayerUUID) -> arraytable of GroupNames
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
2017-08-25 08:43:18 -04:00
|
|
|
!S.CheckParamStaticSelf("cRankManager") ||
|
|
|
|
!S.CheckParamUUID(2) ||
|
2014-08-08 17:12:22 -04:00
|
|
|
!S.CheckParamEnd(3)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the params:
|
2017-08-25 08:43:18 -04:00
|
|
|
cUUID PlayerUUID;
|
2014-08-08 17:12:22 -04:00
|
|
|
S.GetStackValue(2, PlayerUUID);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the groups:
|
2014-10-18 14:55:01 -04:00
|
|
|
AStringVector Groups = cRoot::Get()->GetRankManager()->GetPlayerGroups(PlayerUUID);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Push the results:
|
|
|
|
S.Push(Groups);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Binds cRankManager::GetPlayerMsgVisuals */
|
|
|
|
static int tolua_cRankManager_GetPlayerMsgVisuals(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-08 17:12:22 -04:00
|
|
|
// cRankManager:GetPlayerMsgVisuals(PlayerUUID) -> string, string, string
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
2017-08-25 08:43:18 -04:00
|
|
|
!S.CheckParamStaticSelf("cRankManager") ||
|
|
|
|
!S.CheckParamUUID(2) ||
|
2014-08-08 17:12:22 -04:00
|
|
|
!S.CheckParamEnd(3)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the params:
|
2017-08-25 08:43:18 -04:00
|
|
|
cUUID PlayerUUID;
|
2014-08-08 17:12:22 -04:00
|
|
|
S.GetStackValue(2, PlayerUUID);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the permissions:
|
|
|
|
AString MsgPrefix, MsgSuffix, MsgNameColorCode;
|
2014-10-18 14:55:01 -04:00
|
|
|
if (!cRoot::Get()->GetRankManager()->GetPlayerMsgVisuals(PlayerUUID, MsgPrefix, MsgSuffix, MsgNameColorCode))
|
2014-08-11 10:06:40 -04:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Push the results:
|
2016-08-21 05:03:10 -04:00
|
|
|
S.Push(MsgPrefix, MsgSuffix, MsgNameColorCode);
|
2014-08-08 17:12:22 -04:00
|
|
|
return 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Binds cRankManager::GetPlayerPermissions */
|
|
|
|
static int tolua_cRankManager_GetPlayerPermissions(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-08 17:12:22 -04:00
|
|
|
// cRankManager:GetPlayerPermissions(PlayerUUID) -> arraytable of permissions
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
2017-08-25 08:43:18 -04:00
|
|
|
!S.CheckParamStaticSelf("cRankManager") ||
|
|
|
|
!S.CheckParamUUID(2) ||
|
2014-08-08 17:12:22 -04:00
|
|
|
!S.CheckParamEnd(3)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the params:
|
2017-08-25 08:43:18 -04:00
|
|
|
cUUID PlayerUUID;
|
2014-08-08 17:12:22 -04:00
|
|
|
S.GetStackValue(2, PlayerUUID);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the permissions:
|
2014-10-18 14:55:01 -04:00
|
|
|
AStringVector Permissions = cRoot::Get()->GetRankManager()->GetPlayerPermissions(PlayerUUID);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Push the results:
|
|
|
|
S.Push(Permissions);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
/** Binds cRankManager::GetPlayerRestrictions */
|
|
|
|
static int tolua_cRankManager_GetPlayerRestrictions(lua_State * L)
|
|
|
|
{
|
|
|
|
// Function signature:
|
|
|
|
// cRankManager:GetPlayerRestrictions(PlayerUUID) -> arraytable of restrictions
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
2017-08-25 08:43:18 -04:00
|
|
|
!S.CheckParamStaticSelf("cRankManager") ||
|
|
|
|
!S.CheckParamUUID(2) ||
|
2015-04-25 15:05:35 -04:00
|
|
|
!S.CheckParamEnd(3)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
// Get the params:
|
2017-08-25 08:43:18 -04:00
|
|
|
cUUID PlayerUUID;
|
2015-04-25 15:05:35 -04:00
|
|
|
S.GetStackValue(2, PlayerUUID);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
// Get the permissions:
|
|
|
|
AStringVector Restrictions = cRoot::Get()->GetRankManager()->GetPlayerRestrictions(PlayerUUID);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
// Push the results:
|
|
|
|
S.Push(Restrictions);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
/** Binds cRankManager::GetPlayerRankName */
|
|
|
|
static int tolua_cRankManager_GetPlayerRankName(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-08 17:12:22 -04:00
|
|
|
// cRankManager:GetPlayerRankName(PlayerUUID) -> string
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
2017-08-25 08:43:18 -04:00
|
|
|
!S.CheckParamStaticSelf("cRankManager") ||
|
|
|
|
!S.CheckParamUUID(2) ||
|
2014-08-08 17:12:22 -04:00
|
|
|
!S.CheckParamEnd(3)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the params:
|
2017-08-25 08:43:18 -04:00
|
|
|
cUUID PlayerUUID;
|
2014-08-08 17:12:22 -04:00
|
|
|
S.GetStackValue(2, PlayerUUID);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the rank name:
|
2014-10-18 14:55:01 -04:00
|
|
|
AString RankName = cRoot::Get()->GetRankManager()->GetPlayerRankName(PlayerUUID);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Push the result:
|
|
|
|
S.Push(RankName);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-27 20:17:32 -04:00
|
|
|
/** Binds cRankManager::GetPlayerName */
|
|
|
|
static int tolua_cRankManager_GetPlayerName(lua_State * L)
|
|
|
|
{
|
|
|
|
// Function signature:
|
|
|
|
// cRankManager:GetPlayerName(PlayerUUID) -> string
|
|
|
|
|
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
2017-08-25 08:43:18 -04:00
|
|
|
!S.CheckParamStaticSelf("cRankManager") ||
|
|
|
|
!S.CheckParamUUID(2) ||
|
2014-09-27 20:17:32 -04:00
|
|
|
!S.CheckParamEnd(3)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Get the params:
|
2017-08-25 08:43:18 -04:00
|
|
|
cUUID PlayerUUID;
|
2014-09-27 20:17:32 -04:00
|
|
|
S.GetStackValue(2, PlayerUUID);
|
|
|
|
|
|
|
|
// Get the player name:
|
2014-10-18 14:55:01 -04:00
|
|
|
AString PlayerName = cRoot::Get()->GetRankManager()->GetPlayerName(PlayerUUID);
|
2014-09-27 20:17:32 -04:00
|
|
|
|
|
|
|
// Push the result:
|
|
|
|
S.Push(PlayerName);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
/** Binds cRankManager::GetRankGroups */
|
|
|
|
static int tolua_cRankManager_GetRankGroups(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-08 17:12:22 -04:00
|
|
|
// cRankManager:GetRankGroups(RankName) -> arraytable of groupnames
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamString(2) ||
|
|
|
|
!S.CheckParamEnd(3)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the params:
|
|
|
|
AString RankName;
|
|
|
|
S.GetStackValue(2, RankName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the groups:
|
2014-10-18 14:55:01 -04:00
|
|
|
AStringVector Groups = cRoot::Get()->GetRankManager()->GetRankGroups(RankName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Push the results:
|
|
|
|
S.Push(Groups);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-20 12:09:13 -04:00
|
|
|
/** Binds cRankManager::GetRankPermissions */
|
|
|
|
static int tolua_cRankManager_GetRankPermissions(lua_State * L)
|
2014-08-09 11:36:19 -04:00
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-20 12:09:13 -04:00
|
|
|
// cRankManager:GetRankPermissions(RankName) -> arraytable of permissions
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-09 11:36:19 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamString(2) ||
|
|
|
|
!S.CheckParamEnd(3)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-09 11:36:19 -04:00
|
|
|
// Get the params:
|
|
|
|
AString RankName;
|
|
|
|
S.GetStackValue(2, RankName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-20 12:09:13 -04:00
|
|
|
// Get the permissions:
|
2014-10-18 14:55:01 -04:00
|
|
|
AStringVector Permissions = cRoot::Get()->GetRankManager()->GetRankPermissions(RankName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-09 11:36:19 -04:00
|
|
|
// Push the results:
|
2014-08-20 12:09:13 -04:00
|
|
|
S.Push(Permissions);
|
|
|
|
return 1;
|
2014-08-09 11:36:19 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
/** Binds cRankManager::GetRankRestrictions */
|
|
|
|
static int tolua_cRankManager_GetRankRestrictions(lua_State * L)
|
|
|
|
{
|
|
|
|
// Function signature:
|
|
|
|
// cRankManager:GetRankRestrictions(RankName) -> arraytable of restrictions
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamString(2) ||
|
|
|
|
!S.CheckParamEnd(3)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
// Get the params:
|
|
|
|
AString RankName;
|
|
|
|
S.GetStackValue(2, RankName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
// Get the permissions:
|
|
|
|
AStringVector Restrictions = cRoot::Get()->GetRankManager()->GetRankRestrictions(RankName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
// Push the results:
|
|
|
|
S.Push(Restrictions);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-20 12:09:13 -04:00
|
|
|
/** Binds cRankManager::GetRankVisuals */
|
|
|
|
static int tolua_cRankManager_GetRankVisuals(lua_State * L)
|
2014-08-08 17:12:22 -04:00
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-20 12:09:13 -04:00
|
|
|
// cRankManager:GetRankVisuals(RankName) -> MsgPrefix, MsgSuffix, MsgNameColorCode
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamString(2) ||
|
|
|
|
!S.CheckParamEnd(3)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the params:
|
|
|
|
AString RankName;
|
|
|
|
S.GetStackValue(2, RankName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-20 12:09:13 -04:00
|
|
|
// Get the visuals:
|
|
|
|
AString MsgPrefix, MsgSuffix, MsgNameColorCode;
|
2014-10-18 14:55:01 -04:00
|
|
|
if (!cRoot::Get()->GetRankManager()->GetRankVisuals(RankName, MsgPrefix, MsgSuffix, MsgNameColorCode))
|
2014-08-20 12:09:13 -04:00
|
|
|
{
|
|
|
|
// No such rank, return nothing:
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Push the results:
|
2016-08-21 05:03:10 -04:00
|
|
|
S.Push(MsgPrefix, MsgSuffix, MsgNameColorCode);
|
2014-08-20 12:09:13 -04:00
|
|
|
return 3;
|
2014-08-08 17:12:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Binds cRankManager::GroupExists */
|
|
|
|
static int tolua_cRankManager_GroupExists(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-08 17:12:22 -04:00
|
|
|
// cRankManager:GroupExists(GroupName) -> bool
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamString(2) ||
|
|
|
|
!S.CheckParamEnd(3)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the params:
|
|
|
|
AString GroupName;
|
|
|
|
S.GetStackValue(2, GroupName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the response:
|
2014-10-18 14:55:01 -04:00
|
|
|
bool res = cRoot::Get()->GetRankManager()->GroupExists(GroupName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Push the result:
|
|
|
|
S.Push(res);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Binds cRankManager::IsGroupInRank */
|
|
|
|
static int tolua_cRankManager_IsGroupInRank(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-08 17:12:22 -04:00
|
|
|
// cRankManager:IsGroupInRank(GroupName, RankName) -> bool
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamString(2, 3) ||
|
|
|
|
!S.CheckParamEnd(4)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the params:
|
|
|
|
AString GroupName, RankName;
|
|
|
|
S.GetStackValues(2, GroupName, RankName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the response:
|
2014-10-18 14:55:01 -04:00
|
|
|
bool res = cRoot::Get()->GetRankManager()->IsGroupInRank(GroupName, RankName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Push the result:
|
|
|
|
S.Push(res);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Binds cRankManager::IsPermissionInGroup */
|
|
|
|
static int tolua_cRankManager_IsPermissionInGroup(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-08 17:12:22 -04:00
|
|
|
// cRankManager:IsPermissionInGroup(Permission, GroupName) -> bool
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamString(2, 3) ||
|
|
|
|
!S.CheckParamEnd(4)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the params:
|
|
|
|
AString GroupName, Permission;
|
|
|
|
S.GetStackValues(2, Permission, GroupName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the response:
|
2014-10-18 14:55:01 -04:00
|
|
|
bool res = cRoot::Get()->GetRankManager()->IsPermissionInGroup(Permission, GroupName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Push the result:
|
|
|
|
S.Push(res);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
/** Binds cRankManager::IsRestrictionInGroup */
|
|
|
|
static int tolua_cRankManager_IsRestrictionInGroup(lua_State * L)
|
|
|
|
{
|
|
|
|
// Function signature:
|
|
|
|
// cRankManager:IsRestrictionInGroup(Restriction, GroupName) -> bool
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamString(2, 3) ||
|
|
|
|
!S.CheckParamEnd(4)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
// Get the params:
|
|
|
|
AString GroupName, Restriction;
|
|
|
|
S.GetStackValues(2, Restriction, GroupName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
// Get the response:
|
|
|
|
bool res = cRoot::Get()->GetRankManager()->IsRestrictionInGroup(Restriction, GroupName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
// Push the result:
|
|
|
|
S.Push(res);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
/** Binds cRankManager::IsPlayerRankSet */
|
|
|
|
static int tolua_cRankManager_IsPlayerRankSet(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-08 17:12:22 -04:00
|
|
|
// cRankManager:IsPlayerRankSet(PlayerUUID) -> bool
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
2017-08-25 08:43:18 -04:00
|
|
|
!S.CheckParamStaticSelf("cRankManager") ||
|
|
|
|
!S.CheckParamUUID(2) ||
|
2014-08-08 17:12:22 -04:00
|
|
|
!S.CheckParamEnd(3)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the params:
|
2017-08-25 08:43:18 -04:00
|
|
|
cUUID PlayerUUID;
|
2014-08-08 17:12:22 -04:00
|
|
|
S.GetStackValue(2, PlayerUUID);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the response:
|
2014-10-18 14:55:01 -04:00
|
|
|
bool res = cRoot::Get()->GetRankManager()->IsPlayerRankSet(PlayerUUID);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Push the result:
|
|
|
|
S.Push(res);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Binds cRankManager::RankExists */
|
|
|
|
static int tolua_cRankManager_RankExists(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-08 17:12:22 -04:00
|
|
|
// cRankManager:RankExists(RankName) -> bool
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamString(2) ||
|
|
|
|
!S.CheckParamEnd(3)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the params:
|
|
|
|
AString RankName;
|
|
|
|
S.GetStackValue(2, RankName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the response:
|
2014-10-18 14:55:01 -04:00
|
|
|
bool res = cRoot::Get()->GetRankManager()->RankExists(RankName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Push the result:
|
|
|
|
S.Push(res);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Binds cRankManager::RemoveGroup */
|
|
|
|
static int tolua_cRankManager_RemoveGroup(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-08 17:12:22 -04:00
|
|
|
// cRankManager:RemoveGroup(GroupName)
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamString(2) ||
|
|
|
|
!S.CheckParamEnd(3)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the params:
|
|
|
|
AString GroupName;
|
|
|
|
S.GetStackValue(2, GroupName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Remove the group:
|
2014-10-18 14:55:01 -04:00
|
|
|
cRoot::Get()->GetRankManager()->RemoveGroup(GroupName);
|
2014-08-08 17:12:22 -04:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Binds cRankManager::RemoveGroupFromRank */
|
|
|
|
static int tolua_cRankManager_RemoveGroupFromRank(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-08 17:12:22 -04:00
|
|
|
// cRankManager:RemoveGroupFromRank(GroupName, RankName)
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamString(2, 3) ||
|
|
|
|
!S.CheckParamEnd(4)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the params:
|
|
|
|
AString GroupName, RankName;
|
|
|
|
S.GetStackValues(2, GroupName, RankName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Remove the group:
|
2014-10-18 14:55:01 -04:00
|
|
|
cRoot::Get()->GetRankManager()->RemoveGroupFromRank(GroupName, RankName);
|
2014-08-08 17:12:22 -04:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Binds cRankManager::RemovePermissionFromGroup */
|
|
|
|
static int tolua_cRankManager_RemovePermissionFromGroup(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-08 17:12:22 -04:00
|
|
|
// cRankManager:RemovePermissionFromGroup(Permission, GroupName)
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamString(2, 3) ||
|
|
|
|
!S.CheckParamEnd(4)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the params:
|
|
|
|
AString GroupName, Permission;
|
|
|
|
S.GetStackValues(2, Permission, GroupName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
// Remove the permission:
|
2014-10-18 14:55:01 -04:00
|
|
|
cRoot::Get()->GetRankManager()->RemovePermissionFromGroup(Permission, GroupName);
|
2014-08-08 17:12:22 -04:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
/** Binds cRankManager::RemoveRestrictionFromGroup */
|
|
|
|
static int tolua_cRankManager_RemoveRestrictionFromGroup(lua_State * L)
|
|
|
|
{
|
|
|
|
// Function signature:
|
|
|
|
// cRankManager:RemoveRestrictionFromGroup(Restriction, GroupName)
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamString(2, 3) ||
|
|
|
|
!S.CheckParamEnd(4)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
// Get the params:
|
|
|
|
AString GroupName, Restriction;
|
|
|
|
S.GetStackValues(2, Restriction, GroupName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2015-04-25 15:05:35 -04:00
|
|
|
// Remove the restriction:
|
|
|
|
cRoot::Get()->GetRankManager()->RemoveRestrictionFromGroup(Restriction, GroupName);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-21 10:55:39 -04:00
|
|
|
/** Binds cRankManager::RemovePlayerRank */
|
|
|
|
static int tolua_cRankManager_RemovePlayerRank(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-21 10:55:39 -04:00
|
|
|
// cRankManager:RemovePlayerRank(PlayerUUID)
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-21 10:55:39 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
2017-08-25 08:43:18 -04:00
|
|
|
!S.CheckParamStaticSelf("cRankManager") ||
|
|
|
|
!S.CheckParamUUID(2) ||
|
2014-08-21 10:55:39 -04:00
|
|
|
!S.CheckParamEnd(3)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-21 10:55:39 -04:00
|
|
|
// Get the params:
|
2017-08-25 08:43:18 -04:00
|
|
|
cUUID PlayerUUID;
|
2014-08-21 10:55:39 -04:00
|
|
|
S.GetStackValue(2, PlayerUUID);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-21 10:55:39 -04:00
|
|
|
// Remove the player's rank:
|
2014-10-18 14:55:01 -04:00
|
|
|
cRoot::Get()->GetRankManager()->RemovePlayerRank(PlayerUUID);
|
2014-08-21 10:55:39 -04:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
/** Binds cRankManager::RemoveRank */
|
|
|
|
static int tolua_cRankManager_RemoveRank(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-08 17:12:22 -04:00
|
|
|
// cRankManager:RemoveRank(RankName, [ReplacementRankName])
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamString(2) ||
|
|
|
|
// Param 3 is otpional, defaults to nil -> empty string
|
|
|
|
!S.CheckParamEnd(4)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the params:
|
|
|
|
AString RankName, ReplacementRankName;
|
|
|
|
S.GetStackValues(2, RankName, ReplacementRankName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Remove the rank:
|
2014-10-18 14:55:01 -04:00
|
|
|
cRoot::Get()->GetRankManager()->RemoveRank(RankName, ReplacementRankName);
|
2014-08-08 17:12:22 -04:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Binds cRankManager::RenameGroup */
|
|
|
|
static int tolua_cRankManager_RenameGroup(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-08 17:12:22 -04:00
|
|
|
// cRankManager:RenameGroup(OldName, NewName)
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamString(2, 3) ||
|
|
|
|
!S.CheckParamEnd(4)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the params:
|
|
|
|
AString OldName, NewName;
|
|
|
|
S.GetStackValues(2, OldName, NewName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Remove the group:
|
2014-10-18 14:55:01 -04:00
|
|
|
bool res = cRoot::Get()->GetRankManager()->RenameGroup(OldName, NewName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Push the result:
|
|
|
|
S.Push(res);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Binds cRankManager::RenameRank */
|
|
|
|
static int tolua_cRankManager_RenameRank(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-08 17:12:22 -04:00
|
|
|
// cRankManager:RenameRank(OldName, NewName)
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamString(2, 3) ||
|
|
|
|
!S.CheckParamEnd(4)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the params:
|
|
|
|
AString OldName, NewName;
|
|
|
|
S.GetStackValues(2, OldName, NewName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Remove the rank:
|
2014-10-18 14:55:01 -04:00
|
|
|
bool res = cRoot::Get()->GetRankManager()->RenameRank(OldName, NewName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Push the result:
|
|
|
|
S.Push(res);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-24 14:05:28 -04:00
|
|
|
/** Binds cRankManager::SetDefaultRank */
|
|
|
|
static int tolua_cRankManager_SetDefaultRank(lua_State * L)
|
|
|
|
{
|
|
|
|
// Function signature:
|
|
|
|
// cRankManager:SetDefaultRank(RankName) -> bool
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-24 14:05:28 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamString(2) ||
|
|
|
|
!S.CheckParamEnd(3)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-24 14:05:28 -04:00
|
|
|
// Get the params:
|
|
|
|
AString RankName;
|
|
|
|
S.GetStackValue(2, RankName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-24 14:05:28 -04:00
|
|
|
// Set the rank, return the result:
|
2014-10-18 14:55:01 -04:00
|
|
|
S.Push(cRoot::Get()->GetRankManager()->SetDefaultRank(RankName));
|
2014-09-28 13:08:33 -04:00
|
|
|
return 1;
|
2014-08-24 14:05:28 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
/** Binds cRankManager::SetPlayerRank */
|
|
|
|
static int tolua_cRankManager_SetPlayerRank(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-08 17:12:22 -04:00
|
|
|
// cRankManager:SetPlayerRank(PlayerUUID, PlayerName, RankName)
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
2017-08-25 08:43:18 -04:00
|
|
|
!S.CheckParamStaticSelf("cRankManager") ||
|
|
|
|
!S.CheckParamUUID(2) ||
|
|
|
|
!S.CheckParamString(3, 4) ||
|
2014-08-08 17:12:22 -04:00
|
|
|
!S.CheckParamEnd(5)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the params:
|
2017-08-25 08:43:18 -04:00
|
|
|
AString PlayerName, RankName;
|
|
|
|
cUUID PlayerUUID;
|
2014-08-08 17:12:22 -04:00
|
|
|
S.GetStackValues(2, PlayerUUID, PlayerName, RankName);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Set the rank:
|
2014-10-18 14:55:01 -04:00
|
|
|
cRoot::Get()->GetRankManager()->SetPlayerRank(PlayerUUID, PlayerName, RankName);
|
2014-08-08 17:12:22 -04:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Binds cRankManager::SetRankVisuals */
|
|
|
|
static int tolua_cRankManager_SetRankVisuals(lua_State * L)
|
|
|
|
{
|
2014-08-23 11:56:23 -04:00
|
|
|
// Function signature:
|
2014-08-08 17:12:22 -04:00
|
|
|
// cRankManager:SetRankVisuals(RankName, MsgPrefix, MsgSuffix, MsgNameColorCode)
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
cLuaState S(L);
|
|
|
|
if (
|
|
|
|
!S.CheckParamUserTable(1, "cRankManager") ||
|
|
|
|
!S.CheckParamString(2, 5) ||
|
|
|
|
!S.CheckParamEnd(6)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Get the params:
|
|
|
|
AString RankName, MsgPrefix, MsgSuffix, MsgNameColorCode;
|
|
|
|
S.GetStackValues(2, RankName, MsgPrefix, MsgSuffix, MsgNameColorCode);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Set the visuals:
|
2014-10-18 14:55:01 -04:00
|
|
|
cRoot::Get()->GetRankManager()->SetRankVisuals(RankName, MsgPrefix, MsgSuffix, MsgNameColorCode);
|
2014-08-08 17:12:22 -04:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-13 05:30:57 -04:00
|
|
|
void cManualBindings::BindRankManager(lua_State * tolua_S)
|
2014-08-08 17:12:22 -04:00
|
|
|
{
|
|
|
|
// Create the cRankManager class in the API:
|
|
|
|
tolua_usertype(tolua_S, "cRankManager");
|
2014-10-20 16:55:07 -04:00
|
|
|
tolua_cclass(tolua_S, "cRankManager", "cRankManager", "", nullptr);
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-08-08 17:12:22 -04:00
|
|
|
// Fill in the functions (alpha-sorted):
|
|
|
|
tolua_beginmodule(tolua_S, "cRankManager");
|
2015-04-25 15:05:35 -04:00
|
|
|
tolua_function(tolua_S, "AddGroup", tolua_cRankManager_AddGroup);
|
|
|
|
tolua_function(tolua_S, "AddGroupToRank", tolua_cRankManager_AddGroupToRank);
|
|
|
|
tolua_function(tolua_S, "AddPermissionToGroup", tolua_cRankManager_AddPermissionToGroup);
|
|
|
|
tolua_function(tolua_S, "AddRestrictionToGroup", tolua_cRankManager_AddRestrictionToGroup);
|
|
|
|
tolua_function(tolua_S, "AddRank", tolua_cRankManager_AddRank);
|
|
|
|
tolua_function(tolua_S, "ClearPlayerRanks", tolua_cRankManager_ClearPlayerRanks);
|
|
|
|
tolua_function(tolua_S, "GetAllGroups", tolua_cRankManager_GetAllGroups);
|
|
|
|
tolua_function(tolua_S, "GetAllPermissions", tolua_cRankManager_GetAllPermissions);
|
|
|
|
tolua_function(tolua_S, "GetAllRestrictions", tolua_cRankManager_GetAllRestrictions);
|
|
|
|
tolua_function(tolua_S, "GetAllPermissionsRestrictions", tolua_cRankManager_GetAllPermissionsRestrictions);
|
|
|
|
tolua_function(tolua_S, "GetAllPlayerUUIDs", tolua_cRankManager_GetAllPlayerUUIDs);
|
|
|
|
tolua_function(tolua_S, "GetAllRanks", tolua_cRankManager_GetAllRanks);
|
|
|
|
tolua_function(tolua_S, "GetDefaultRank", tolua_cRankManager_GetDefaultRank);
|
|
|
|
tolua_function(tolua_S, "GetGroupPermissions", tolua_cRankManager_GetGroupPermissions);
|
|
|
|
tolua_function(tolua_S, "GetGroupRestrictions", tolua_cRankManager_GetGroupRestrictions);
|
|
|
|
tolua_function(tolua_S, "GetPlayerGroups", tolua_cRankManager_GetPlayerGroups);
|
|
|
|
tolua_function(tolua_S, "GetPlayerMsgVisuals", tolua_cRankManager_GetPlayerMsgVisuals);
|
|
|
|
tolua_function(tolua_S, "GetPlayerPermissions", tolua_cRankManager_GetPlayerPermissions);
|
|
|
|
tolua_function(tolua_S, "GetPlayerPermissions", tolua_cRankManager_GetPlayerRestrictions);
|
|
|
|
tolua_function(tolua_S, "GetPlayerRankName", tolua_cRankManager_GetPlayerRankName);
|
|
|
|
tolua_function(tolua_S, "GetPlayerName", tolua_cRankManager_GetPlayerName);
|
|
|
|
tolua_function(tolua_S, "GetRankGroups", tolua_cRankManager_GetRankGroups);
|
|
|
|
tolua_function(tolua_S, "GetRankPermissions", tolua_cRankManager_GetRankPermissions);
|
|
|
|
tolua_function(tolua_S, "GetRankRestrictions", tolua_cRankManager_GetRankRestrictions);
|
|
|
|
tolua_function(tolua_S, "GetRankVisuals", tolua_cRankManager_GetRankVisuals);
|
|
|
|
tolua_function(tolua_S, "GroupExists", tolua_cRankManager_GroupExists);
|
|
|
|
tolua_function(tolua_S, "IsGroupInRank", tolua_cRankManager_IsGroupInRank);
|
|
|
|
tolua_function(tolua_S, "IsPermissionInGroup", tolua_cRankManager_IsPermissionInGroup);
|
|
|
|
tolua_function(tolua_S, "IsRestrictionInGroup", tolua_cRankManager_IsRestrictionInGroup);
|
|
|
|
tolua_function(tolua_S, "IsPlayerRankSet", tolua_cRankManager_IsPlayerRankSet);
|
|
|
|
tolua_function(tolua_S, "RankExists", tolua_cRankManager_RankExists);
|
|
|
|
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, "RemoveRestrictionFromGroup", tolua_cRankManager_RemoveRestrictionFromGroup);
|
|
|
|
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);
|
|
|
|
tolua_function(tolua_S, "SetDefaultRank", tolua_cRankManager_SetDefaultRank);
|
|
|
|
tolua_function(tolua_S, "SetPlayerRank", tolua_cRankManager_SetPlayerRank);
|
|
|
|
tolua_function(tolua_S, "SetRankVisuals", tolua_cRankManager_SetRankVisuals);
|
2014-08-08 17:12:22 -04:00
|
|
|
tolua_endmodule(tolua_S);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|