Players are no longer able to place liquids using packet 82. Fixes #1260

This commit is contained in:
ProfessorXZ 2016-08-12 12:28:41 +02:00
parent e0f17b82ef
commit 6c0f3ec15d
2 changed files with 10 additions and 1 deletions

View file

@ -18,6 +18,8 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
* Players can no longer quick stack items into region protected chests (@ProfessorXZ) * Players can no longer quick stack items into region protected chests (@ProfessorXZ)
* Rope placement is no longer blocked by range checks (@ProfessorXZ) * Rope placement is no longer blocked by range checks (@ProfessorXZ)
* The Drill Containment Unit breaks blocks properly now (@ProfessorXZ) * The Drill Containment Unit breaks blocks properly now (@ProfessorXZ)
* Fixed Expert mode coin duplication (@ProfessorXZ)
* Players are no longer able to place liquids using LoadNetModule packet (@ProfessorXZ)
## TShock 4.3.17 ## TShock 4.3.17

View file

@ -1260,6 +1260,7 @@ namespace TShockAPI
{ PacketTypes.PlaceTileEntity, HandlePlaceTileEntity }, { PacketTypes.PlaceTileEntity, HandlePlaceTileEntity },
{ PacketTypes.PlaceItemFrame, HandlePlaceItemFrame }, { PacketTypes.PlaceItemFrame, HandlePlaceItemFrame },
{ PacketTypes.SyncExtraValue, HandleSyncExtraValue }, { PacketTypes.SyncExtraValue, HandleSyncExtraValue },
{ PacketTypes.LoadNetModule, HandleLoadNetModule },
{ PacketTypes.ToggleParty, HandleToggleParty } { PacketTypes.ToggleParty, HandleToggleParty }
}; };
} }
@ -4228,6 +4229,12 @@ namespace TShockAPI
return false; return false;
} }
private static bool HandleLoadNetModule(GetDataHandlerArgs args)
{
// Since this packet is never actually sent to us, every attempt at sending it can be considered as a liquid exploit attempt
return true;
}
private static bool HandleToggleParty(GetDataHandlerArgs args) private static bool HandleToggleParty(GetDataHandlerArgs args)
{ {
if (args.Player != null && !args.Player.HasPermission(Permissions.toggleparty)) if (args.Player != null && !args.Player.HasPermission(Permissions.toggleparty))