MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / SetAdminPassword

Method SetAdminPassword

core/logic/AdminCache.cpp:1414–1431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1412}
1413
1414void AdminCache::SetAdminPassword(AdminId id, const char *password)
1415{
1416 AdminUser *pUser = (AdminUser *)m_pMemory->GetAddress(id);
1417 if (!pUser || pUser->magic != USR_MAGIC_SET)
1418 {
1419 return;
1420 }
1421
1422 if (password[0] == '\0')
1423 {
1424 pUser->password = -1;
1425 return;
1426 }
1427
1428 int i_password = m_pStrings->AddString(password);
1429 pUser = (AdminUser *)m_pMemory->GetAddress(id);
1430 pUser->password = i_password;
1431}
1432
1433unsigned int AdminCache::FlagBitsToBitArray(FlagBits bits, bool array[], unsigned int maxSize)
1434{

Callers 1

SetAdminPasswordFunction · 0.80

Calls 2

GetAddressMethod · 0.45
AddStringMethod · 0.45

Tested by

no test coverage detected