summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/chat-server/chathandler.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/chat-server/chathandler.cpp b/src/chat-server/chathandler.cpp
index ca0cc88c..4170ef13 100644
--- a/src/chat-server/chathandler.cpp
+++ b/src/chat-server/chathandler.cpp
@@ -718,6 +718,13 @@ ChatHandler::handleGuildQuit(ChatClient &client, MessageIn &msg)
{
reply.writeByte(ERRMSG_OK);
reply.writeShort(guildId);
+
+ // Check if they are the leader, and if so, remove the guild channel
+ if (guild->checkLeader(client.characterName))
+ {
+ chatChannelManager->removeChannel(chatChannelManager->getChannelId(guild->getName()));
+ }
+
guildManager->removeGuildMember(guildId, client.characterName);
}
else