mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-02-19 10:58:20 +00:00
1.4.5a
- 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:
15
Helper.cs
15
Helper.cs
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user