aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/GroupHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Handlers/GroupHandler.cpp')
-rw-r--r--src/server/game/Handlers/GroupHandler.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/server/game/Handlers/GroupHandler.cpp b/src/server/game/Handlers/GroupHandler.cpp
index 6cc162eff89..cf803ed2d88 100644
--- a/src/server/game/Handlers/GroupHandler.cpp
+++ b/src/server/game/Handlers/GroupHandler.cpp
@@ -69,6 +69,13 @@ void WorldSession::HandlePartyInviteOpcode(WorldPackets::Party::PartyInviteClien
return;
}
+ // player trying to invite himself (most likely cheating)
+ if (player == GetPlayer())
+ {
+ SendPartyResult(PARTY_OP_INVITE, player->GetName(), ERR_BAD_PLAYER_NAME_S);
+ return;
+ }
+
// restrict invite to GMs
if (!sWorld->getBoolConfig(CONFIG_ALLOW_GM_GROUP) && !GetPlayer()->IsGameMaster() && player->IsGameMaster())
{
@@ -160,6 +167,7 @@ void WorldSession::HandlePartyInviteOpcode(WorldPackets::Party::PartyInviteClien
}
if (!group->AddInvite(player))
{
+ group->RemoveAllInvites();
delete group;
return;
}