mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-09-27 20:17:04 +02:00
1.7.4a
【UPDATE 1.7.4a】
**🆕 What's new and what's changed:**
- Exposed event `OnAdminShowActivity` - fire when the function of informing players of admin action is performed
- Exposed `ShowAdminActivity`
- Added module to integration with AntiDLL
- Added module to integration with Redis (plugin send info about penalties between all servers)
This commit is contained in:
parent
64e5f1156e
commit
babcbc2119
50 changed files with 3277 additions and 39 deletions
|
|
@ -94,7 +94,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message if necessary
|
||||
if (caller == null || !SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
}
|
||||
|
||||
// Schedule a kick timer
|
||||
|
|
@ -420,7 +420,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message if necessary
|
||||
if (caller == null || !SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
}
|
||||
|
||||
// Log the warning command
|
||||
|
|
|
|||
|
|
@ -558,7 +558,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message if necessary
|
||||
if (!SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, caller.PlayerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, caller.PlayerName, false ,adminActivityArgs);
|
||||
}
|
||||
|
||||
MenuApi?.CloseMenu(caller);
|
||||
|
|
@ -583,7 +583,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (!SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, caller.PlayerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, caller.PlayerName, false, adminActivityArgs);
|
||||
}
|
||||
|
||||
MenuApi?.CloseMenu(caller);
|
||||
|
|
@ -608,7 +608,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (!SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, caller.PlayerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, caller.PlayerName, false, adminActivityArgs);
|
||||
}
|
||||
|
||||
MenuApi?.CloseMenu(caller);
|
||||
|
|
@ -633,7 +633,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (!SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, caller.PlayerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, caller.PlayerName, false, adminActivityArgs);
|
||||
}
|
||||
|
||||
MenuApi?.CloseMenu(caller);
|
||||
|
|
@ -825,7 +825,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (caller == null || !SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
}
|
||||
|
||||
// Schedule the kick for the player
|
||||
|
|
@ -894,7 +894,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (caller == null || !SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
}
|
||||
|
||||
Helper.LogCommand(caller, command?.GetCommandString ?? $"css_map {map}");
|
||||
|
|
@ -924,7 +924,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (caller == null || !SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, ["CALLER", map]);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, ["CALLER", map]);
|
||||
}
|
||||
|
||||
// Add timer to execute the map change command after a delay
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (caller == null || !SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
}
|
||||
|
||||
// Increment the player's total gags count
|
||||
|
|
@ -355,7 +355,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (caller == null || !SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
}
|
||||
|
||||
// Increment the player's total mutes count
|
||||
|
|
@ -623,7 +623,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (caller == null || !SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
}
|
||||
|
||||
// Increment the player's total silences count
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (caller == null || !SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
}
|
||||
|
||||
// Log the command
|
||||
|
|
@ -109,7 +109,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (caller == null || !SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (caller == null || !SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
}
|
||||
|
||||
// Schedule unfreeze for the player if time is specified
|
||||
|
|
@ -203,7 +203,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (caller == null || !SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
}
|
||||
|
||||
// Log the command and send Discord notification
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (caller == null || !SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
}
|
||||
|
||||
// Log the command and send Discord notification
|
||||
|
|
@ -133,7 +133,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (caller == null || !SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -161,7 +161,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (caller == null || !SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -212,7 +212,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (caller == null || !SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -261,7 +261,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (caller == null || !SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -317,7 +317,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (caller == null || !SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -373,7 +373,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (caller == null || !SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -425,7 +425,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (caller == null || !SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -483,7 +483,7 @@ public partial class CS2_SimpleAdmin
|
|||
|
||||
if (_localizer != null)
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -580,7 +580,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (caller != null && SilentPlayers.Contains(caller.Slot)) return;
|
||||
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
}
|
||||
|
||||
[CommandHelper(1, "<#userid or name> <new name>")]
|
||||
|
|
@ -621,7 +621,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (caller != null && SilentPlayers.Contains(caller.Slot)) return;
|
||||
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
|
||||
// Rename the player
|
||||
player.Rename(newName);
|
||||
|
|
@ -662,7 +662,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (caller != null && !SilentPlayers.Contains(caller.Slot))
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
}
|
||||
|
||||
// Determine if the new name is valid and update the renamed players list
|
||||
|
|
@ -732,7 +732,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Display admin activity message to other players
|
||||
if (caller != null && SilentPlayers.Contains(caller.Slot)) return;
|
||||
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, callerName, false, adminActivityArgs);
|
||||
}
|
||||
|
||||
[CommandHelper(1, "<#userid or name>")]
|
||||
|
|
@ -801,7 +801,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Show admin activity
|
||||
if (!SilentPlayers.Contains(caller.Slot) && _localizer != null)
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, caller.PlayerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, caller.PlayerName, false, adminActivityArgs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -872,7 +872,7 @@ public partial class CS2_SimpleAdmin
|
|||
// Show admin activity
|
||||
if (!SilentPlayers.Contains(caller.Slot) && _localizer != null)
|
||||
{
|
||||
Helper.ShowAdminActivity(activityMessageKey, caller.PlayerName, adminActivityArgs);
|
||||
Helper.ShowAdminActivity(activityMessageKey, caller.PlayerName, false, adminActivityArgs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue