MCPcopy Create free account
hub / github.com/ddnet/ddnet / GetAuthLevel

Function GetAuthLevel

src/engine/server/server.cpp:3573–3584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3571}
3572
3573static int GetAuthLevel(const char *pLevel)
3574{
3575 int Level = -1;
3576 if(!str_comp_nocase(pLevel, "admin"))
3577 Level = AUTHED_ADMIN;
3578 else if(str_startswith(pLevel, "mod"))
3579 Level = AUTHED_MOD;
3580 else if(!str_comp_nocase(pLevel, "helper"))
3581 Level = AUTHED_HELPER;
3582
3583 return Level;
3584}
3585
3586bool CServer::CanClientUseCommandCallback(int ClientId, const IConsole::ICommandInfo *pCommand, void *pUser)
3587{

Callers 4

ConAuthAddMethod · 0.85
ConAuthAddHashedMethod · 0.85
ConAuthUpdateMethod · 0.85
ConAuthUpdateHashedMethod · 0.85

Calls 2

str_comp_nocaseFunction · 0.85
str_startswithFunction · 0.85

Tested by

no test coverage detected