- Added `ReloadAdminsEveryMapChange` - Reloading sql admins on map start
- Ability to use any valid steamid instead of steamid64
- Fixed chat commands when gagged
- Votes now respect `UseChatMenu` config setting
This commit is contained in:
Dawid Bepierszcz
2024-06-09 17:55:33 +02:00
parent 962529e445
commit 00facafdcb
13 changed files with 105 additions and 62 deletions

View File

@@ -75,6 +75,21 @@ namespace CS2_SimpleAdmin
const string pattern = @"^\d{17}$";
return Regex.IsMatch(input, pattern);
}
public static bool ValidateSteamId(string input, out SteamID? steamId)
{
steamId = null;
if (string.IsNullOrEmpty(input))
{
return false;
}
if (!SteamID.TryParse(input, out var parsedSteamId)) return false;
steamId = parsedSteamId;
return true;
}
public static bool IsValidIp(string input)
{