From: miniduikboot Date: Sun, 28 Apr 2024 15:45:23 +0000 (+0200) Subject: Move Name checks to NameLimits X-Git-Tag: v1.9.2~2^2~1 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=be39c9facfd6e691ff365c3a333c70f699ac4ff7;p=rhonda%2Fimpostor.git Move Name checks to NameLimits --- diff --git a/src/Impostor.Server/Net/Inner/Objects/InnerPlayerControl.cs b/src/Impostor.Server/Net/Inner/Objects/InnerPlayerControl.cs index 37dffe5..863d961 100644 --- a/src/Impostor.Server/Net/Inner/Objects/InnerPlayerControl.cs +++ b/src/Impostor.Server/Net/Inner/Objects/InnerPlayerControl.cs @@ -591,7 +591,7 @@ namespace Impostor.Server.Net.Inner.Objects if (sender.Client.Name != name) { - if (await sender.Client.ReportCheatAsync(RpcCalls.CheckName, CheatCategory.GameFlow, "Client sent name not matching his name from handshake")) + if (await sender.Client.ReportCheatAsync(RpcCalls.CheckName, CheatCategory.NameLimits, "Client sent name not matching his name from handshake")) { return false; } @@ -606,7 +606,7 @@ namespace Impostor.Server.Net.Inner.Objects { if (Game.GameState == GameStates.Started) { - if (await sender.Client.ReportCheatAsync(RpcCalls.SetColor, CheatCategory.GameFlow, "Client tried to set a name midgame")) + if (await sender.Client.ReportCheatAsync(RpcCalls.SetName, CheatCategory.GameFlow, "Client tried to set a name midgame")) { return false; } @@ -624,7 +624,7 @@ namespace Impostor.Server.Net.Inner.Objects if (sender.Client.Name != name) { - if (await sender.Client.ReportCheatAsync(RpcCalls.SetName, CheatCategory.GameFlow, "Client sent name not matching his name from handshake")) + if (await sender.Client.ReportCheatAsync(RpcCalls.SetName, CheatCategory.NameLimits, "Client sent name not matching his name from handshake")) { return false; } @@ -655,7 +655,7 @@ namespace Impostor.Server.Net.Inner.Objects if (name != expected) { - if (await sender.Client.ReportCheatAsync(RpcCalls.SetName, CheatCategory.GameFlow, "Client sent SetName with incorrect name")) + if (await sender.Client.ReportCheatAsync(RpcCalls.SetName, CheatCategory.NameLimits, "Client sent SetName with incorrect name")) { await SetNameAsync(expected); return false; @@ -664,7 +664,7 @@ namespace Impostor.Server.Net.Inner.Objects } else { - if (await sender.Client.ReportCheatAsync(RpcCalls.SetName, CheatCategory.GameFlow, $"Client sent {nameof(RpcCalls.SetName)} for a player that didn't request it")) + if (await sender.Client.ReportCheatAsync(RpcCalls.SetName, CheatCategory.NameLimits, $"Client sent {nameof(RpcCalls.SetName)} for a player that didn't request it")) { return false; }