Skip to content

Commit

Permalink
Added quotable arguments, potential fix for ban * not banning anyone.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheUbMunster authored and Sanae6 committed Jul 27, 2022
1 parent d604c59 commit db05586
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ async void SyncShineBag() {
Client[] clients = (args[0].Trim() == "*"
? server.Clients.Where(c => c.Connected)
: server.Clients.Where(c =>
c.Connected && args.Any(x => c.Name.StartsWith(x) || (Guid.TryParse(x, out Guid result) && result == c.Id)))).ToArray();
c.Connected && args.Any(x => c.Name == x || (Guid.TryParse(x, out Guid result) && result == c.Id)))).ToArray();
foreach (Client user in clients) {
if (moreThanOne) builder.Append(", ");
builder.Append(user.Name);
Expand All @@ -225,7 +225,7 @@ async void SyncShineBag() {
Client[] clients = (args[0].Trim() == "*"
? server.Clients.Where(c => c.Connected)
: server.Clients.Where(c =>
c.Connected && args.Any(x => c.Name.StartsWith(x) || (Guid.TryParse(x, out Guid result) && result == c.Id)))).ToArray();
c.Connected && args.Any(x => c.Name == x || (Guid.TryParse(x, out Guid result) && result == c.Id)))).ToArray();
foreach (Client user in clients) {
if (moreThanOne) builder.Append(", ");
moreThanOne = true;
Expand Down Expand Up @@ -254,7 +254,7 @@ await user.Send(new ChangeStagePacket {
Client[] clients = (args[0].Trim() == "*"
? server.Clients.Where(c => c.Connected)
: server.Clients.Where(c =>
c.Connected && args.Any(x => c.Name.StartsWith(x) || (Guid.TryParse(x, out Guid result) && result == c.Id)))).ToArray();
c.Connected && args.Any(x => c.Name == x || (Guid.TryParse(x, out Guid result) && result == c.Id)))).ToArray();
foreach (Client user in clients) {
if (moreThanOne) builder.Append(", ");
moreThanOne = true;
Expand Down

0 comments on commit db05586

Please sign in to comment.