Core/Guild: Fix an exploit related to CMSG_GUILD_CREATE

This commit is contained in:
Dehravor
2014-01-01 13:52:03 +01:00
parent 20004050bc
commit 14287326c7
+1 -10
View File
@@ -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)