Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configs/admins.jsonc.example
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
//
// // If at least 1 group is added above, these are all optional fields.
// "flags": "abcdefg", // Permission flags. Combines with any flags defined in user's groups
// "immunity": "1" // Non-negative value. Takes highest value from here or any of user's groups
// "immunity": 1 // Non-negative value. Takes highest value from here or any of user's groups
//}
}
}
7 changes: 3 additions & 4 deletions src/cs2fixes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ void CS2Fixes::Hook_DispatchConCommand(ConCommandRef cmdHandle, const CCommandCo
auto pController = CCSPlayerController::FromSlot(iCommandPlayerSlot);
bool bGagged = pController && pController->GetZEPlayer()->IsGagged();
bool bFlooding = pController && pController->GetZEPlayer()->IsFlooding();
bool bIsAdmin = pController && pController->GetZEPlayer()->IsAdminFlagSet(ADMFLAG_GENERIC);
bool bAdminChat = bTeamSay && *args[1] == '@';
bool bSilent = *args[1] == '/' || bAdminChat;
bool bCommand = *args[1] == '!' || *args[1] == '/';
Expand Down Expand Up @@ -575,10 +576,8 @@ void CS2Fixes::Hook_DispatchConCommand(ConCommandRef cmdHandle, const CCommandCo
if (!pPlayer)
continue;

if (pPlayer->IsAdminFlagSet(ADMFLAG_GENERIC))
ClientPrint(CCSPlayerController::FromSlot(i), HUD_PRINTTALK, " \4(ADMINS) %s:\1 %s", pController->GetPlayerName(), pszMessage);
else if (i == iCommandPlayerSlot.Get()) // Sender is not an admin
ClientPrint(pController, HUD_PRINTTALK, " \4(TO ADMINS) %s:\1 %s", pController->GetPlayerName(), pszMessage);
if (i == iCommandPlayerSlot.Get() || pPlayer->IsAdminFlagSet(ADMFLAG_GENERIC))
ClientPrint(CCSPlayerController::FromSlot(i), HUD_PRINTTALK, " \4(%sADMINS) %s:\6 %s", bIsAdmin ? "" : "TO ", pController->GetPlayerName(), pszMessage);
}
}

Expand Down