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

grab gametype from status for T7

This commit is contained in:
RaidMax
2020-08-05 09:30:02 -05:00
parent 1793f630f2
commit a749185468
8 changed files with 48 additions and 7 deletions

View File

@ -37,6 +37,7 @@ namespace SharedLibraryCore.Interfaces
RConDvarLatchedValue = 109,
RConDvarDomain = 110,
RConStatusMap = 111,
RConStatusGametype = 112,
AdditionalGroup = 200
}

View File

@ -38,8 +38,8 @@ namespace SharedLibraryCore.Interfaces
/// get the list of connected clients from status response
/// </summary>
/// <param name="connection">RCon connection to use</param>
/// <returns>list of clients, and current map</returns>
Task<(List<EFClient>, string)> GetStatusAsync(IRConConnection connection);
/// <returns>list of clients, current map, and current gametype</returns>
Task<(List<EFClient>, string, string)> GetStatusAsync(IRConConnection connection);
/// <summary>
/// stores the RCon configuration

View File

@ -21,6 +21,11 @@ namespace SharedLibraryCore.Interfaces
/// </summary>
ParserRegex MapStatus { get; set; }
/// <summary>
/// stores regex info for parsing the gametype line from rcon status response
/// </summary>
ParserRegex GametypeStatus { get; set; }
/// <summary>
/// stores the regex info for parsing get DVAR responses
/// </summary>

View File

@ -786,7 +786,7 @@ namespace SharedLibraryCore
return await server.RconParser.ExecuteCommandAsync(server.RemoteConnection, commandName);
}
public static Task<(List<EFClient>, string)> GetStatusAsync(this Server server)
public static Task<(List<EFClient>, string, string)> GetStatusAsync(this Server server)
{
return server.RconParser.GetStatusAsync(server.RemoteConnection);
}