diff --git a/ProjectLighthouse.Servers.GameServer/Controllers/Slots/ScoreController.cs b/ProjectLighthouse.Servers.GameServer/Controllers/Slots/ScoreController.cs index 1fc2bbb0..80c725ea 100644 --- a/ProjectLighthouse.Servers.GameServer/Controllers/Slots/ScoreController.cs +++ b/ProjectLighthouse.Servers.GameServer/Controllers/Slots/ScoreController.cs @@ -52,8 +52,15 @@ public class ScoreController : ControllerBase } // Workaround for parsing player ids of versus levels - if (score.PlayerIds.Length == 1 && score.PlayerIds[0].Contains(':')) - score.PlayerIds = score.PlayerIds[0].Split(":", StringSplitOptions.RemoveEmptyEntries); + if (score.PlayerIds.Length == 1) + { + char[] delimiters = { ':', ',', }; + foreach (char delimiter in delimiters) + { + score.PlayerIds = score.PlayerIds[0].Split(delimiter, StringSplitOptions.RemoveEmptyEntries); + } + + } if (score.PlayerIds.Length == 0) { @@ -82,8 +89,9 @@ public class ScoreController : ControllerBase { string bodyString = await this.ReadBodyAsync(); Logger.Warn("Rejecting score upload, requester username is not present in playerIds" + - $" (user='{username}', playerIds='{string.Join(",", score.PlayerIds)}', " + - $"gameVersion={token.GameVersion.ToPrettyString()}, type={score.Type}, id={id}, slotType={slotType}, body='{bodyString}')", LogArea.Score); + $" (user='{username}', playerIds='{string.Join(",", score.PlayerIds)}' playerIds.Length={score.PlayerIds.Length}, " + + $"gameVersion={token.GameVersion.ToPrettyString()}, type={score.Type}, id={id}, slotType={slotType}, body='{bodyString}')", + LogArea.Score); return this.BadRequest(); }