mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-10-18 04:47:04 +02:00
1.3.9a
**MAJOR UPDATE** - New database schema - Added `css_admins_flags` table - Added `css_unmutes` table - Added `css_unbans` table
This commit is contained in:
parent
7a8fd066f7
commit
270b36fa26
20 changed files with 523 additions and 226 deletions
|
|
@ -8,7 +8,7 @@ namespace CS2_SimpleAdmin.Menus
|
|||
{
|
||||
public static BaseMenu CreateMenu(string title)
|
||||
{
|
||||
return CS2_SimpleAdmin.Instance.Config.UseChatMenu ? new ChatMenu(title) : new CenterHtmlMenu(title);
|
||||
return CS2_SimpleAdmin.Instance.Config.UseChatMenu ? new ChatMenu(title) : new CenterHtmlMenu(title, CS2_SimpleAdmin.Instance);
|
||||
}
|
||||
|
||||
public static void OpenMenu(CCSPlayerController player, BaseMenu menu)
|
||||
|
|
@ -44,7 +44,7 @@ namespace CS2_SimpleAdmin.Menus
|
|||
new ChatMenuOptionData("Manage Server", () => ManageServerMenu.OpenMenu(admin)),
|
||||
new ChatMenuOptionData("Fun actions", () => FunActionsMenu.OpenMenu(admin)),
|
||||
};
|
||||
|
||||
|
||||
List<CustomServerCommandData> customCommands = CS2_SimpleAdmin.Instance.Config.CustomServerCommands;
|
||||
if (customCommands.Count > 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ namespace CS2_SimpleAdmin.Menus
|
|||
private static void AddAdmin(CCSPlayerController admin, CCSPlayerController player, string flag)
|
||||
{
|
||||
// TODO: Change default immunity?
|
||||
CS2_SimpleAdmin.Instance.AddAdmin(admin, player.SteamID.ToString(), player.PlayerName, flag, 10);
|
||||
CS2_SimpleAdmin.AddAdmin(admin, player.SteamID.ToString(), player.PlayerName, flag, 10);
|
||||
}
|
||||
|
||||
private static void RemoveAdmin(CCSPlayerController admin, CCSPlayerController player)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
using System.Web;
|
||||
using CounterStrikeSharp.API.Core;
|
||||
using CounterStrikeSharp.API.Modules.Admin;
|
||||
using CounterStrikeSharp.API.Modules.Menu;
|
||||
using System.Web;
|
||||
|
||||
namespace CS2_SimpleAdmin.Menus
|
||||
{
|
||||
|
|
@ -32,9 +32,13 @@ namespace CS2_SimpleAdmin.Menus
|
|||
BaseMenu menu = AdminMenu.CreateMenu(menuName);
|
||||
|
||||
IEnumerable<CCSPlayerController> players = Helper.GetValidPlayersWithBots();
|
||||
string playerName = string.Empty;
|
||||
|
||||
foreach (CCSPlayerController player in players)
|
||||
{
|
||||
string optionName = HttpUtility.HtmlEncode(player.PlayerName);
|
||||
playerName = player.PlayerName.Length > 26 ? player.PlayerName[..26] : player.PlayerName;
|
||||
|
||||
string optionName = HttpUtility.HtmlEncode(playerName);
|
||||
if (enableFilter != null && enableFilter(player) == false)
|
||||
continue;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue