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

Function RoleNameToAuthLevel

src/engine/server/authmanager.cpp:29–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29static int RoleNameToAuthLevel(const char *pRoleName)
30{
31 if(!str_comp(pRoleName, RoleName::ADMIN))
32 return AUTHED_ADMIN;
33 if(!str_comp(pRoleName, RoleName::MODERATOR))
34 return AUTHED_MOD;
35 if(!str_comp(pRoleName, RoleName::HELPER))
36 return AUTHED_HELPER;
37
38 dbg_assert_failed("Invalid role name: %s", pRoleName);
39}
40
41static MD5_DIGEST HashPassword(const char *pPassword, const unsigned char aSalt[SALT_BYTES])
42{

Callers 1

AddDefaultKeyMethod · 0.85

Calls 1

str_compFunction · 0.85

Tested by

no test coverage detected