Core/Guild: Fix an exploit related to CMSG_GUILD_CREATE
This commit is contained in:
@@ -43,19 +43,10 @@ void WorldSession::HandleGuildQueryOpcode(WorldPacket& recvPacket)
|
||||
|
||||
void WorldSession::HandleGuildCreateOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
TC_LOG_DEBUG("network", "WORLD: Received CMSG_GUILD_CREATE");
|
||||
|
||||
std::string name;
|
||||
recvPacket >> name;
|
||||
|
||||
if (!GetPlayer()->GetGuildId()) // Player cannot be in guild
|
||||
{
|
||||
Guild* guild = new Guild();
|
||||
if (guild->Create(GetPlayer(), name))
|
||||
sGuildMgr->AddGuild(guild);
|
||||
else
|
||||
delete guild;
|
||||
}
|
||||
TC_LOG_ERROR("guild", "CMSG_GUILD_CREATE: Possible hacking-attempt: %s tried to create a guild [Name: %s] using cheats", GetPlayerInfo().c_str(), name.c_str());
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
|
||||
|
||||
Reference in New Issue
Block a user