fix login issue

strip colors for logging
feature implementation for issue #76
This commit is contained in:
RaidMax
2019-08-04 20:38:55 -05:00
parent 75378400e7
commit 08d250156c
6 changed files with 52 additions and 18 deletions

View File

@ -156,6 +156,14 @@ namespace SharedLibraryCore
/// <returns></returns>
public static string FixIW4ForwardSlash(this string str) => str.Replace("/", " /");
private static readonly IList<string> _zmGameTypes = new[] { "zclassic", "zstandard", "zcleansed", "zgrief" };
/// <summary>
/// indicates if the given server is running a zombie game mode
/// </summary>
/// <param name="server"></param>
/// <returns></returns>
public static bool IsZombieServer(this Server server) => server.GameName == Game.T6 && _zmGameTypes.Contains(server.Gametype.ToLower());
/// <summary>
/// Get the IW Engine color code corresponding to an admin level
/// </summary>