Move emoji player index check into IllegalPerSe
This is the first commit in a pattern that I'd like to follow. The concept is that we specifically create handlers for things that are "illegal per se." That is, there are no possible situations (in the current protocol) where a packet of this type is received from a client. In this case, I moved the emoji handler out of the Handler just for emoji, since it seemed like an obvious case. The rule of thumb is simple: if something is illegal per se, there should be no possible way in the vanilla client to achieve this result. If a player sends this combination of packets they *must* be hacking. Not that there is a 99.9% chance they're hacking, but that there is a 100% unambiguous chance that they're hacking. Something is illegal per se if it can only be created by a hacked client. If there's a crashing bug that a normal player can do with a complex series of vanilla events, that is not illegal per se. The goal of this namespace and class of handlers is to handle exactly one type of protocol violation, and remove the packet accordingly. If it is ever reported that the packet can be sent from a vanilla client, the check must be removed as it is no longer a per se violation of the protocol.
This commit is contained in:
parent
e5e66264d5
commit
046d52ad2e
5 changed files with 34 additions and 10 deletions
|
|
@ -106,6 +106,7 @@
|
|||
<Compile Include="Handlers\RequestTileEntityInteractionHandler.cs" />
|
||||
<Compile Include="Handlers\SendTileRectHandler.cs" />
|
||||
<Compile Include="Handlers\SyncTilePickingHandler.cs" />
|
||||
<Compile Include="Handlers\IllegalPerSe\EmojiPlayerMismatch.cs" />
|
||||
<Compile Include="Hooks\AccountHooks.cs" />
|
||||
<Compile Include="Hooks\GeneralHooks.cs" />
|
||||
<Compile Include="Hooks\PlayerHooks.cs" />
|
||||
|
|
@ -239,4 +240,4 @@
|
|||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue