1
0

Bindings: Fixed binding for cPlayer::PermissionMatches().

This commit is contained in:
madmaxoft 2014-10-01 12:59:31 +02:00
parent 901bed3989
commit 886a7d7bbb

View File

@ -1957,26 +1957,20 @@ static int tolua_cPlayer_PermissionMatches(lua_State * tolua_S)
// Check the params: // Check the params:
cLuaState L(tolua_S); cLuaState L(tolua_S);
if ( if (
!L.CheckParamUserType(1, "cPlayer") || !L.CheckParamUserTable(1, "cPlayer") ||
!L.CheckParamString (2, 3) || !L.CheckParamString (2, 3) ||
!L.CheckParamEnd (4) !L.CheckParamEnd (4)
) )
{ {
return 0; return 0;
} }
// Get the params: // Get the params:
cPlayer * self = (cPlayer *)tolua_tousertype(tolua_S, 1, NULL);
if (self == NULL)
{
LOGWARNING("%s: invalid self (%p)", __FUNCTION__, self);
return 0;
}
AString Permission, Template; AString Permission, Template;
L.GetStackValues(2, Permission, Template); L.GetStackValues(2, Permission, Template);
// Push the result of the match: // Push the result of the match:
L.Push(self->PermissionMatches(StringSplit(Permission, "."), StringSplit(Template, "."))); L.Push(cPlayer::PermissionMatches(StringSplit(Permission, "."), StringSplit(Template, ".")));
return 1; return 1;
} }