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

update mapname from status query

This commit is contained in:
RaidMax
2019-11-18 14:02:35 -06:00
parent 564c1524e3
commit 89b690938a
7 changed files with 54 additions and 14 deletions

View File

@ -37,6 +37,7 @@ namespace SharedLibraryCore.Interfaces
RConDvarDefaultValue = 108,
RConDvarLatchedValue = 109,
RConDvarDomain = 110,
RConStatusMap = 111,
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></returns>
Task<List<EFClient>> GetStatusAsync(Connection connection);
/// <returns>list of clients, and current map</returns>
Task<(List<EFClient>, string)> GetStatusAsync(Connection connection);
/// <summary>
/// stores the RCon configuration

View File

@ -8,14 +8,22 @@ namespace SharedLibraryCore.Interfaces
/// stores the command format for console commands
/// </summary>
CommandPrefix CommandPrefixes { get; set; }
/// <summary>
/// stores the regex info for parsing get status response
/// </summary>
ParserRegex Status { get; set; }
/// <summary>
/// stores regex info for parsing the map line from rcon status response
/// </summary>
ParserRegex MapStatus { get; set; }
/// <summary>
/// stores the regex info for parsing get DVAR responses
/// </summary>
ParserRegex Dvar { get; set; }
/// <summary>
/// indicates if the application should wait for response from server
/// when executing a command

View File

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