diff options
author | madmaxoft <github@xoft.cz> | 2014-10-01 12:59:31 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-10-01 12:59:31 +0200 |
commit | 886a7d7bbb48dbff2975892c441c68cfd5ad281b (patch) | |
tree | 9f1cd1acbbd1520941327fae2807afa1e1ee2588 /src/Bindings/ManualBindings.cpp | |
parent | Unified cRoot broadcast chat documentation. (diff) | |
download | cuberite-886a7d7bbb48dbff2975892c441c68cfd5ad281b.tar cuberite-886a7d7bbb48dbff2975892c441c68cfd5ad281b.tar.gz cuberite-886a7d7bbb48dbff2975892c441c68cfd5ad281b.tar.bz2 cuberite-886a7d7bbb48dbff2975892c441c68cfd5ad281b.tar.lz cuberite-886a7d7bbb48dbff2975892c441c68cfd5ad281b.tar.xz cuberite-886a7d7bbb48dbff2975892c441c68cfd5ad281b.tar.zst cuberite-886a7d7bbb48dbff2975892c441c68cfd5ad281b.zip |
Diffstat (limited to 'src/Bindings/ManualBindings.cpp')
-rw-r--r-- | src/Bindings/ManualBindings.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/Bindings/ManualBindings.cpp b/src/Bindings/ManualBindings.cpp index d8134f159..f4764447c 100644 --- a/src/Bindings/ManualBindings.cpp +++ b/src/Bindings/ManualBindings.cpp @@ -1957,26 +1957,20 @@ static int tolua_cPlayer_PermissionMatches(lua_State * tolua_S) // Check the params: cLuaState L(tolua_S); if ( - !L.CheckParamUserType(1, "cPlayer") || - !L.CheckParamString (2, 3) || - !L.CheckParamEnd (4) + !L.CheckParamUserTable(1, "cPlayer") || + !L.CheckParamString (2, 3) || + !L.CheckParamEnd (4) ) { return 0; } // 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; L.GetStackValues(2, Permission, Template); // Push the result of the match: - L.Push(self->PermissionMatches(StringSplit(Permission, "."), StringSplit(Template, "."))); + L.Push(cPlayer::PermissionMatches(StringSplit(Permission, "."), StringSplit(Template, "."))); return 1; } |