Skip to content

Commit

Permalink
As a search option as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Simyon264 committed Mar 2, 2024
1 parent 49b1760 commit 793e8ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Server/ReplayParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ public static List<Replay> SearchReplays(SearchMode mode, string query, List<Rep
return replays.Where(x => (x.RoundEndPlayers ?? []).Any(y => y.PlayerOocName.Contains(query, StringComparison.CurrentCultureIgnoreCase))).ToList();
case SearchMode.RoundEndText:
return replays.Where(x => x.RoundEndText != null && x.RoundEndText.Contains(query, StringComparison.CurrentCultureIgnoreCase)).ToList();
case SearchMode.ServerName:
return replays.Where(x => x.ServerName != null && x.ServerName.Contains(query, StringComparison.CurrentCultureIgnoreCase)).ToList();
default:
throw new NotImplementedException();
}
Expand Down
1 change: 1 addition & 0 deletions Shared/SearchMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ public enum SearchMode
PlayerIcName,
PlayerOocName,
Guid,
ServerName,
}

0 comments on commit 793e8ff

Please sign in to comment.