mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -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:
@ -7,11 +7,10 @@ namespace SharedLibraryCore.Interfaces
|
||||
/// <summary>
|
||||
/// Generates a game event based on log line input
|
||||
/// </summary>
|
||||
/// <param name="server">server the event occurred on</param>
|
||||
/// <param name="logLine">single log line string</param>
|
||||
/// <returns></returns>
|
||||
/// todo: make this integrate without needing the server
|
||||
GameEvent GetEvent(Server server, string logLine);
|
||||
GameEvent GenerateGameEvent(string logLine);
|
||||
/// <summary>
|
||||
/// Get game specific folder prefix for log files
|
||||
/// </summary>
|
||||
|
@ -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