1. diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp
  2. index 260220b..01d1bff 100755
  3. --- a/src/server/game/Handlers/ItemHandler.cpp
  4. +++ b/src/server/game/Handlers/ItemHandler.cpp
  5. @@ -1351,6 +1351,21 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
  6. _player->RemoveTradeableItem(itemTarget);
  7. itemTarget->ClearSoulboundTradeable(_player); // clear tradeable flag
  8. +
  9. + for (int i = 0; i < MAX_GEM_SOCKETS; ++i)
  10. + {
  11. + // tried to put gem in socket where no socket exists (take care about prismatic sockets)
  12. + if (!itemProto->Socket[0].Color) // only if item do not have 0 slot for gems
  13. + {
  14. + // Fix exploit with /run ClickSocketButton(2) or /run ClickSocketButton(index) index = to 1 do 3
  15. + if (i != 0 && itemTarget->GetEnchantmentId(EnchantmentSlot(SOCK_ENCHANTMENT_SLOT + i))) // Check Slot SOCK_ENCHANTMENT_SLOT_2 and SOCK_ENCHANTMENT_SLOT_3
  16. + {
  17. + sLog->outError(LOG_FILTER_NETWORKIO, "WORLD: HandleSocketOpcode Possible Cheater wit Item, ItemEntry %u, Player '%s'", itemTarget->GetEntry(), _player->GetName());
  18. + _player->ApplyEnchantment(itemTarget, EnchantmentSlot(SOCK_ENCHANTMENT_SLOT + i), false); // Remove stats item for slot SOCK_ENCHANTMENT_SLOT_2 and SOCK_ENCHANTMENT_SLOT_3
  19. + itemTarget->ClearEnchantment(EnchantmentSlot(SOCK_ENCHANTMENT_SLOT + i)); // Remove Slot SOCK_ENCHANTMENT_SLOT_2 and SOCK_ENCHANTMENT_SLOT_3
  20. + }
  21. + }
  22. + }
  23. }