fix reading PT6 having signed decimal GUID in log

fix  alternative encoding character converting
allow more paths for game log server
add localization for unknown ips in welcome plugin
add gamelog server uri to support game log server on games that must supply manual log path
misc fixes
This commit is contained in:
RaidMax
2019-02-09 15:35:13 -06:00
parent 7c6419a16a
commit dea5b3f954
15 changed files with 81 additions and 67 deletions

View File

@ -17,13 +17,13 @@ namespace IW4MAdmin.Application.IO
{
readonly IEventParser Parser;
readonly IGameLogServer Api;
readonly string LogFile;
readonly string logPath;
public GameLogReaderHttp(string logFile, IEventParser parser)
public GameLogReaderHttp(Uri gameLogServerUri, string logPath, IEventParser parser)
{
LogFile = logFile;
this.logPath = logPath.ToBase64UrlSafeString(); ;
Parser = parser;
Api = RestClient.For<IGameLogServer>(logFile);
Api = RestClient.For<IGameLogServer>(gameLogServerUri);
}
public long Length => -1;
@ -36,12 +36,12 @@ namespace IW4MAdmin.Application.IO
server.Logger.WriteDebug($"Begin reading from http log");
#endif
var events = new List<GameEvent>();
string b64Path = server.LogPath.ToBase64UrlSafeString();
string b64Path = logPath;
var response = await Api.Log(b64Path);
if (!response.Success)
{
server.Logger.WriteError($"Could not get log server info of {LogFile}/{b64Path} ({server.LogPath})");
server.Logger.WriteError($"Could not get log server info of {logPath}/{b64Path} ({server.LogPath})");
return events;
}