MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / TestAccess

Method TestAccess

src/lua/LuaHTTP.cpp:580–591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

578
579
580int LuaHTTPMgr::TestAccess(lua_State* L) {
581 const std::string hostname = luaL_checkstring(L, 1);
582 if ((accessList == NULL) || accessList->alwaysAuthorized()) {
583 lua_pushboolean(L, 1);
584 }
585 else {
586 std::vector<std::string> hostnames;
587 hostnames.push_back(hostname);
588 lua_pushboolean(L, accessList->authorized(hostnames));
589 }
590 return 1;
591}
592
593
594//============================================================================//

Callers

nothing calls this directly

Calls 4

alwaysAuthorizedMethod · 0.80
authorizedMethod · 0.80
lua_pushbooleanFunction · 0.50
push_backMethod · 0.45

Tested by

no test coverage detected