diff --git a/docs/manaserv.xml.example b/docs/manaserv.xml.example
index a2171e9c..2baf684d 100644
--- a/docs/manaserv.xml.example
+++ b/docs/manaserv.xml.example
@@ -191,6 +191,7 @@
+
diff --git a/src/account-server/storage.cpp b/src/account-server/storage.cpp
index 8876cd4b..44cedd1c 100644
--- a/src/account-server/storage.cpp
+++ b/src/account-server/storage.cpp
@@ -1478,9 +1478,9 @@ void Storage::setMemberRights(int guildId, int memberId, int rights)
{
std::ostringstream sql;
sql << "UPDATE " << GUILD_MEMBERS_TBL_NAME
- << " SET rights = '" << rights << "'"
- << " WHERE member_id = '" << memberId << "'"
- << " AND guild_id = '" << guildId << "'';";
+ << " SET rights = " << rights
+ << " WHERE member_id = " << memberId
+ << " AND guild_id = " << guildId << ";";
mDb->execSql(sql.str());
}
catch (const dal::DbSqlQueryExecFailure& e)
diff --git a/src/chat-server/chatclient.h b/src/chat-server/chatclient.h
index dc077321..a0812a30 100644
--- a/src/chat-server/chatclient.h
+++ b/src/chat-server/chatclient.h
@@ -47,8 +47,9 @@ class ChatClient : public NetComputer
std::string characterName;
unsigned int characterId;
- std::vector< ChatChannel * > channels;
- Party* party;
+ std::vector channels;
+ std::vector guilds;
+ Party *party;
unsigned char accountLevel;
std::map userModes;
};
diff --git a/src/chat-server/chathandler.cpp b/src/chat-server/chathandler.cpp
index 9c74cc30..0446fa30 100644
--- a/src/chat-server/chathandler.cpp
+++ b/src/chat-server/chathandler.cpp
@@ -127,6 +127,9 @@ void ChatHandler::computerDisconnected(NetComputer *comp)
// Remove user from party
removeUserFromParty(*computer);
+ // Notify guilds about him leaving
+ guildManager->disconnectPlayer(computer);
+
// Remove the character from the player map
// need to do this after removing them from party
// as that uses the player map
diff --git a/src/chat-server/chathandler.h b/src/chat-server/chathandler.h
index af22e453..aa11dd5c 100644
--- a/src/chat-server/chathandler.h
+++ b/src/chat-server/chathandler.h
@@ -25,7 +25,10 @@
#include