From 1a45d85ff6b8b5cc43674e87afafbbfee90acd53 Mon Sep 17 00:00:00 2001 From: Brett Hewitson Date: Mon, 9 May 2022 13:34:33 +1000 Subject: [PATCH] RCON Player List Fixes - fixed player list for EPIC players. --- src/ARKServerManager/Lib/ServerRCON.cs | 16 +- .../Lib/ViewModel/PlayerInfo.cs | 3 +- src/ARKServerManager/VersionFeed.xml | 25 ++- src/ARKServerManager/VersionFeedBeta.xml | 152 +----------------- src/ConanServerManager/Lib/ServerRcon.cs | 9 +- .../Lib/ViewModel/PlayerInfo.cs | 3 +- src/ConanServerManager/VersionFeed.xml | 25 ++- src/ConanServerManager/VersionFeedBeta.xml | 152 +----------------- 8 files changed, 81 insertions(+), 304 deletions(-) diff --git a/src/ARKServerManager/Lib/ServerRCON.cs b/src/ARKServerManager/Lib/ServerRCON.cs index 38b98a05..5b36d482 100644 --- a/src/ARKServerManager/Lib/ServerRCON.cs +++ b/src/ARKServerManager/Lib/ServerRCON.cs @@ -332,21 +332,25 @@ namespace ServerManagerTool.Lib // This is bound to the UI thread private List HandleListPlayersCommand(IEnumerable commandLines) { + /* + > listplayers + 0. Bletch, 76561197991984752 <- steam + 0. Bletch, 7171521174456260817 <- epic + */ var output = new List(); var onlinePlayers = new List(); - var playerLines = commandLines?.ToList() ?? new List(); + if (playerLines.Count > 0) { - foreach (var line in playerLines) { - var elements = line.Split(','); - if (elements.Length != 2) + var elements = line.Split(',', '.'); + if (elements.Length != 3) // Invalid data. Ignore it. continue; - var id = elements[1]?.Trim(); + var id = elements[2].Trim(); if (onlinePlayers.FirstOrDefault(p => p.PlayerId.Equals(id, StringComparison.OrdinalIgnoreCase)) != null) // Duplicate data. Ignore it. @@ -355,7 +359,7 @@ namespace ServerManagerTool.Lib var newPlayer = new PlayerInfo() { PlayerId = id, - PlayerName = elements[0].Substring(elements[0].IndexOf('.') + 1).Trim(), + PlayerName = elements[1].Trim(), IsOnline = true, }; onlinePlayers.Add(newPlayer); diff --git a/src/ARKServerManager/Lib/ViewModel/PlayerInfo.cs b/src/ARKServerManager/Lib/ViewModel/PlayerInfo.cs index e9cc300a..012abc90 100644 --- a/src/ARKServerManager/Lib/ViewModel/PlayerInfo.cs +++ b/src/ARKServerManager/Lib/ViewModel/PlayerInfo.cs @@ -124,7 +124,8 @@ namespace ServerManagerTool.Lib.ViewModel.RCON if (playerData == null) return; - playerData.PlayerName = PlayerData?.PlayerName; + if (PlayerData?.PlayerName != null) + playerData.PlayerName = PlayerData.PlayerName; playerData.LastPlatformUpdateUtc = PlayerData?.LastPlatformUpdateUtc ?? DateTime.MinValue; } diff --git a/src/ARKServerManager/VersionFeed.xml b/src/ARKServerManager/VersionFeed.xml index 85bea004..0165e3ce 100644 --- a/src/ARKServerManager/VersionFeed.xml +++ b/src/ARKServerManager/VersionFeed.xml @@ -5,7 +5,30 @@ Ark Server Manager Version Feed This is the Ark Server Manager release version feed. - 2022-05-07T00:00:00Z + 2022-05-09T00:00:00Z + + + urn:uuid:632DF17A-04C7-4A74-8C82-0106D0770393 + 1.1.426 (1.1.426.1) + 1.1.426.1 + + 2022-05-09T00:00:00Z + +
+

+ BUGFIX +
+

    +
  • Rcon Player List - fixed a bug when displaying the player details for Epic Players.
  • +
+

+
+
+ + bletch + bletch1971@hotmail.com + +
urn:uuid:2C48A585-72D2-43FB-8987-6B5F0B3E460F diff --git a/src/ARKServerManager/VersionFeedBeta.xml b/src/ARKServerManager/VersionFeedBeta.xml index ad8f6964..c04772bb 100644 --- a/src/ARKServerManager/VersionFeedBeta.xml +++ b/src/ARKServerManager/VersionFeedBeta.xml @@ -5,161 +5,21 @@ Ark Server Manager Version Feed This is the Ark Server Manager beta version feed. - 2022-05-08T00:00:00Z + 2022-05-09T00:00:00Z - urn:uuid:6F7A6BDA-891F-4446-B889-3FC218D207D6 - 1.1.425 (1.1.425.7) - 1.1.425.7 + urn:uuid:632DF17A-04C7-4A74-8C82-0106D0770393 + 1.1.426 (1.1.426.1) + 1.1.426.1 - 2022-05-08T00:00:00Z + 2022-05-09T00:00:00Z

BUGFIX

    -
  • Fixed an issue with the path normalization, where it would add extra '\' characters to the end of the path, when the path was a Unc path.
  • -
-

-
-
- - bletch - bletch1971@hotmail.com - -
- - - urn:uuid:973E001F-223C-4B57-89F7-8B8040900A7C - 1.1.425 (1.1.425.6) - 1.1.425.6 - - 2022-05-08T00:00:00Z - -
-

- BUGFIX -
-

    -
  • World Save Backup - fixed the backup of the files.
  • -
-

-
-
- - bletch - bletch1971@hotmail.com - -
- - - urn:uuid:CEA21F86-5943-46F9-8807-604695E42A25 - 1.1.425 (1.1.425.5) - 1.1.425.5 - - 2022-05-08T00:00:00Z - -
-

- CHANGE -
-

    -
  • Rcon Window - minor changes to the player list, online player count and server status.
  • -
-

-
-
- - bletch - bletch1971@hotmail.com - -
- - - urn:uuid:358E0063-27AE-4D5F-BDA5-BD9723EE353E - 1.1.425 (1.1.425.4) - 1.1.425.4 - - 2022-05-07T00:00:00Z - -
-

- CHANGE -
-

    -
  • Global Backup Settings - added option to include/exclude the SaveGames folder in the worldsave backup (default exclude).
  • -
  • Global Alert Settings - added new textbox allowing the formatting of the ipaddress and port in the server startup message (default {ipaddress}:{port}).
  • -
-

-
-
- - bletch - bletch1971@hotmail.com - -
- - - urn:uuid:606BA376-9AB5-46D9-8533-0BEBF841934E - 1.1.425 (1.1.425.3) - 1.1.425.3 - - 2022-05-06T00:00:00Z - -
-

- CHANGE -
-

    -
  • Security Protocol Changes - updated the security protocols to use TLS12 and TLS13.
  • -
-

-
-
- - bletch - bletch1971@hotmail.com - -
- - - urn:uuid:E6701920-FF1E-48B7-B70A-18B9BC3592F7 - 1.1.425 (1.1.425.2) - 1.1.425.2 - - 2022-05-06T00:00:00Z - -
-

- CHANGE -
-

    -
  • Auto Backup Settings - added RCON broadcast mode droplist, so backup processes can send messages via RCON using this mode.
  • -
-

-
-
- - bletch - bletch1971@hotmail.com - -
- - - urn:uuid:2C48A585-72D2-43FB-8987-6B5F0B3E460F - 1.1.425 (1.1.425.1) - 1.1.425.1 - - 2022-05-06T00:00:00Z - -
-

- CHANGE -
-

    -
  • Global Settings - added RCON broadcast mode droplist, so auto processes can send messages via RCON using this mode.
  • -
  • Auto Processes - changed the message broadcast to use the new config setting, not a hardcoded value.
  • +
  • Rcon Player List - fixed a bug when displaying the player details for Epic Players.

diff --git a/src/ConanServerManager/Lib/ServerRcon.cs b/src/ConanServerManager/Lib/ServerRcon.cs index 540bd646..32dffffc 100644 --- a/src/ConanServerManager/Lib/ServerRcon.cs +++ b/src/ConanServerManager/Lib/ServerRcon.cs @@ -296,6 +296,11 @@ namespace ServerManagerTool.Lib // This is bound to the UI thread private List HandleListPlayersCommand(IEnumerable commandLines) { + /* + > listplayers + Idx | Char name | Player name | User ID | Platform ID | Platform Name + 0 | Alora Truthrider | Bletch#80041 | CE9DBB451DD05733 | 76561197991984752 | Steam + */ var output = new List(); var onlinePlayers = new List(); @@ -312,7 +317,7 @@ namespace ServerManagerTool.Lib // Invalid data. Ignore it. continue; - var id = elements[3]?.Trim(); + var id = elements[3].Trim(); if (onlinePlayers.FirstOrDefault(p => p.PlayerId.Equals(id, StringComparison.OrdinalIgnoreCase)) != null) // Duplicate data. Ignore it. @@ -321,7 +326,7 @@ namespace ServerManagerTool.Lib var newPlayer = new PlayerInfo() { PlayerId = id, - PlayerName = elements[2].Substring(0, elements[2].IndexOf('#')).Trim(), + PlayerName = elements[2].Trim(), CharacterName = elements[1].Trim(), IsOnline = true, }; diff --git a/src/ConanServerManager/Lib/ViewModel/PlayerInfo.cs b/src/ConanServerManager/Lib/ViewModel/PlayerInfo.cs index c1d4f4cb..47beccdf 100644 --- a/src/ConanServerManager/Lib/ViewModel/PlayerInfo.cs +++ b/src/ConanServerManager/Lib/ViewModel/PlayerInfo.cs @@ -124,7 +124,8 @@ namespace ServerManagerTool.Lib.ViewModel if (playerData == null) return; - playerData.PlayerName = PlayerData?.PlayerName; + if (PlayerData?.PlayerName != null) + playerData.PlayerName = PlayerData.PlayerName; playerData.LastPlatformUpdateUtc = PlayerData?.LastPlatformUpdateUtc ?? DateTime.MinValue; } diff --git a/src/ConanServerManager/VersionFeed.xml b/src/ConanServerManager/VersionFeed.xml index 5882488c..87278833 100644 --- a/src/ConanServerManager/VersionFeed.xml +++ b/src/ConanServerManager/VersionFeed.xml @@ -5,7 +5,30 @@ Conan Server Manager Version Feed This is the Conan Server Manager release version feed. - 2022-05-08T00:00:00Z + 2022-05-09T00:00:00Z + + + urn:uuid:86CF3CE5-C935-4C04-8D31-224B2E1DD203 + 1.1.70 (1.1.70.1) + 1.1.70.1 + + 2022-05-09T00:00:00Z + +
+

+ BUGFIX +
+

    +
  • Rcon Player List - fixed a bug when displaying the player details for Epic Players.
  • +
+

+
+
+ + bletch + bletch1971@hotmail.com + +
urn:uuid:AD8ABBB5-093A-4FDB-B473-FCED2DB46781 diff --git a/src/ConanServerManager/VersionFeedBeta.xml b/src/ConanServerManager/VersionFeedBeta.xml index 9912ab73..ed90be0e 100644 --- a/src/ConanServerManager/VersionFeedBeta.xml +++ b/src/ConanServerManager/VersionFeedBeta.xml @@ -5,161 +5,21 @@ Conan Server Manager Version Feed This is the Conan Server Manager beta version feed. - 2022-05-08T00:00:00Z + 2022-05-09T00:00:00Z - urn:uuid:3DDB3838-5020-4CA3-A054-423479FFB667 - 1.1.69 (1.1.69.7) - 1.1.69.7 + urn:uuid:86CF3CE5-C935-4C04-8D31-224B2E1DD203 + 1.1.70 (1.1.70.1) + 1.1.70.1 - 2022-05-08T00:00:00Z + 2022-05-09T00:00:00Z

BUGFIX

    -
  • Fixed an issue with the path normalization, where it would add extra '\' characters to the end of the path, when the path was a Unc path.
  • -
-

-
-
- - bletch - bletch1971@hotmail.com - -
- - - urn:uuid:72CA1005-0061-41A3-9883-F826B8F9F27F - 1.1.69 (1.1.69.6) - 1.1.69.6 - - 2022-05-08T00:00:00Z - -
-

- BUGFIX -
-

    -
  • World Save Backup - fixed the backup of the files.
  • -
-

-
-
- - bletch - bletch1971@hotmail.com - -
- - - urn:uuid:68ECEA73-1C9C-4DCB-807B-0D812E986993 - 1.1.69 (1.1.69.5) - 1.1.69.5 - - 2022-05-08T00:00:00Z - -
-

- CHANGE -
-

    -
  • Rcon Window - minor changes to the player list, online player count and server status.
  • -
  • Online Player Count - fixed the online player count to display the correct value.
  • -
-

-
-
- - bletch - bletch1971@hotmail.com - -
- - - urn:uuid:D886601C-8260-4E06-8B2A-D8F77F1F1B58 - 1.1.69 (1.1.69.4) - 1.1.69.4 - - 2022-05-07T00:00:00Z - -
-

- CHANGE -
-

    -
  • Global Backup Settings - added option to include/exclude the SaveGames folder in the worldsave backup (default exclude).
  • -
  • Global Alert Settings - added new textbox allowing the formatting of the ipaddress and port in the server startup message (default {ipaddress}:{port}).
  • -
-

-
-
- - bletch - bletch1971@hotmail.com - -
- - - urn:uuid:92A777C4-75B2-468F-BC46-F42327A4D2D1 - 1.1.69 (1.1.69.3) - 1.1.69.3 - - 2022-05-06T00:00:00Z - -
-

- CHANGE -
-

    -
  • Security Protocol Changes - updated the security protocols to use TLS12 and TLS13.
  • -
-

-
-
- - bletch - bletch1971@hotmail.com - -
- - - urn:uuid:6AC9586B-1678-46B5-9FD7-86B20FB67293 - 1.1.69 (1.1.69.2) - 1.1.69.2 - - 2022-05-06T00:00:00Z - -
-

- CHANGE -
-

    -
  • Auto Backup Settings - added RCON broadcast mode droplist, so backup processes can send messages via RCON using this mode.
  • -
-

-
-
- - bletch - bletch1971@hotmail.com - -
- - - urn:uuid:AD8ABBB5-093A-4FDB-B473-FCED2DB46781 - 1.1.69 (1.1.69.1) - 1.1.69.1 - - 2022-05-06T00:00:00Z - -
-

- BUGFIX -
-

    -
  • Fixed an issue that would not send through the auto process messages via RCON using the correct mode selected in the global settings.
  • +
  • Rcon Player List - fixed a bug when displaying the player details for Epic Players.