mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 07:13:58 -05:00
clean up the profanity determent plugin by using the Get/Set Additional properties
cleaned up the base event parser to not need the server object to generate the event Hopefully prevent anticheat from freaking out when database connection is lost
This commit is contained in:
@ -268,11 +268,16 @@ namespace SharedLibraryCore
|
||||
}
|
||||
}
|
||||
|
||||
public static long ConvertGuidToLong(this string str)
|
||||
public static long ConvertGuidToLong(this string str, long? fallback = null)
|
||||
{
|
||||
str = str.Substring(0, Math.Min(str.Length, 16));
|
||||
var bot = Regex.Match(str, @"bot[0-9]+").Value;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(str) && fallback.HasValue)
|
||||
{
|
||||
return fallback.Value;
|
||||
}
|
||||
|
||||
// this is a special case for Plutonium T6
|
||||
if (str.Length <= 11 &&
|
||||
long.TryParse(str, NumberStyles.Integer, CultureInfo.InvariantCulture, out long id)) // 10 numeric characters + signed character
|
||||
|
Reference in New Issue
Block a user