1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 07:13:58 -05:00

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 38313ab184
commit ab52388ae1
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>