diff options
author | David Athay <ko2fan@gmail.com> | 2008-04-03 15:57:27 +0000 |
---|---|---|
committer | David Athay <ko2fan@gmail.com> | 2008-04-03 15:57:27 +0000 |
commit | 438ead13e1132da8ed9e5c3afe0ccc9f8961d787 (patch) | |
tree | 01fb95f22411b9a79f852bcec1d9127ab07047e7 /src/chat-server | |
parent | b2f7f15bfe74361ad86e9ec6fb14ad6b434083c4 (diff) | |
download | manaserv-438ead13e1132da8ed9e5c3afe0ccc9f8961d787.tar.gz manaserv-438ead13e1132da8ed9e5c3afe0ccc9f8961d787.tar.bz2 manaserv-438ead13e1132da8ed9e5c3afe0ccc9f8961d787.tar.xz manaserv-438ead13e1132da8ed9e5c3afe0ccc9f8961d787.zip |
Restricted who can be invited to guilds
Diffstat (limited to 'src/chat-server')
-rw-r--r-- | src/chat-server/chathandler.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/chat-server/chathandler.cpp b/src/chat-server/chathandler.cpp index 0ec9ba39..3d2d8742 100644 --- a/src/chat-server/chathandler.cpp +++ b/src/chat-server/chathandler.cpp @@ -621,8 +621,11 @@ ChatHandler::handleGuildInvitation(ChatClient &client, MessageIn &msg) if (invitedClient && guild) { - // check permissions of inviter - if (guild->checkLeader(client.characterName)) + // check permissions of inviter, and that they arent inviting themself, + // and arent someone already in the guild + if (guild->checkLeader(client.characterName) && + (client.characterName != character) && + !guild->checkInGuild(character)) { // send the name of the inviter and the name of the guild // that the character has been invited to join |