| 356 | } |
| 357 | |
| 358 | bool PlayerManager::CheckSetAdmin(int index, CPlayer *pPlayer, AdminId id) |
| 359 | { |
| 360 | const char *password = adminsys->GetAdminPassword(id); |
| 361 | if (password != NULL) |
| 362 | { |
| 363 | if (m_PassInfoVar.size() < 1) |
| 364 | { |
| 365 | return false; |
| 366 | } |
| 367 | |
| 368 | /* Whoa... the user needs a password! */ |
| 369 | const char *given = engine->GetClientConVarValue(index, m_PassInfoVar.c_str()); |
| 370 | if (!given || strcmp(given, password) != 0) |
| 371 | { |
| 372 | return false; |
| 373 | } |
| 374 | } |
| 375 | |
| 376 | pPlayer->SetAdminId(id, false); |
| 377 | |
| 378 | return true; |
| 379 | } |
| 380 | |
| 381 | bool PlayerManager::CheckSetAdminName(int index, CPlayer *pPlayer, AdminId id) |
| 382 | { |
no test coverage detected