From b14a80b9b0344af47cf7acaa58534c9d733c1e3e Mon Sep 17 00:00:00 2001 From: RaidMax Date: Fri, 5 Apr 2019 21:15:17 -0500 Subject: [PATCH] strip drive letter on gamelog server if running on linux strip undecodable chacters from gamelog server log file finish re work on alias add/update ( I think) --- .gitignore | 3 +- Application/IW4MServer.cs | 19 +++---- GameLogServer/GameLogServer.pyproj | 15 +++++- GameLogServer/GameLogServer/log_reader.py | 35 ++++++------ GameLogServer/GameLogServer/log_resource.py | 1 - .../GameLogServer/restart_resource.py | 54 +++++++++---------- GameLogServer/GameLogServer/server.py | 4 +- GameLogServer/requirements.txt | 34 ++++-------- Plugins/Stats/Plugin.cs | 51 ++++++++++++++++-- Plugins/Tests/ManagerFixture.cs | 4 +- Plugins/Tests/ManagerTests.cs | 2 +- .../Configuration/ApplicationConfiguration.cs | 2 +- SharedLibraryCore/Services/ClientService.cs | 39 ++++++++------ SharedLibraryCore/Utilities.cs | 3 +- 14 files changed, 157 insertions(+), 109 deletions(-) diff --git a/.gitignore b/.gitignore index acbf2afb..c111e82f 100644 --- a/.gitignore +++ b/.gitignore @@ -232,4 +232,5 @@ bootstrap-custom.min.css launchSettings.json /VpnDetectionPrivate.js /Plugins/ScriptPlugins/VpnDetectionPrivate.js -**/Master/env_master \ No newline at end of file +**/Master/env_master +/GameLogServer/log_env diff --git a/Application/IW4MServer.cs b/Application/IW4MServer.cs index 15488428..17f5c0ad 100644 --- a/Application/IW4MServer.cs +++ b/Application/IW4MServer.cs @@ -36,8 +36,7 @@ namespace IW4MAdmin override public async Task OnClientConnected(EFClient clientFromLog) { Logger.WriteDebug($"Client slot #{clientFromLog.ClientNumber} now reserved"); - Clients[clientFromLog.ClientNumber] = new EFClient(); - + try { EFClient client = await Manager.GetClientService().GetUnique(clientFromLog.NetworkId); @@ -71,7 +70,7 @@ namespace IW4MAdmin Clients[client.ClientNumber] = client; - client.State = EFClient.ClientState.Connected; + client.State = ClientState.Connected; #if DEBUG == true Logger.WriteDebug($"End PreConnect for {client}"); #endif @@ -207,7 +206,14 @@ namespace IW4MAdmin var existingClient = GetClientsAsList().FirstOrDefault(_client => _client.Equals(E.Origin)); + // they're already connected + if (existingClient != null) + { + return false; + } + CONNECT: + // we can go ahead and put them in if (Clients[E.Origin.ClientNumber] == null) { #if DEBUG == true @@ -229,17 +235,12 @@ namespace IW4MAdmin } // for some reason there's still a client in the spot - else if (existingClient == null) + else { Logger.WriteWarning($"{E.Origin} is connecteding but {Clients[E.Origin.ClientNumber]} is currently in that client slot"); await OnClientDisconnected(Clients[E.Origin.ClientNumber]); goto CONNECT; } - - else - { - return false; - } } else if (E.Type == GameEvent.EventType.Flag) diff --git a/GameLogServer/GameLogServer.pyproj b/GameLogServer/GameLogServer.pyproj index 8361eddb..d1c464b0 100644 --- a/GameLogServer/GameLogServer.pyproj +++ b/GameLogServer/GameLogServer.pyproj @@ -17,7 +17,7 @@ true GameLogServer GameLogServer - MSBuild|env|$(MSBuildProjectFullPath) + MSBuild|log_env|$(MSBuildProjectFullPath) False DEBUG=True @@ -50,7 +50,6 @@ - @@ -63,6 +62,18 @@ PYTHONPATH X64 + + log_env + 3.6 + log_env (Python 3.6 (64-bit)) + Scripts\python.exe + Scripts\pythonw.exe + PYTHONPATH + X64 + + + +