diff options
author | David Athay <ko2fan@gmail.com> | 2008-08-18 11:51:43 +0000 |
---|---|---|
committer | David Athay <ko2fan@gmail.com> | 2008-08-18 11:51:43 +0000 |
commit | 6652688b1f72920a9b0d43a83f40f010e11198c2 (patch) | |
tree | d48d3aa7265fa76b71c56445411317c6470a3c83 /src/chat-server | |
parent | 35dcb50b5fefae76c5d9a88ffc27faaa96eaa9eb (diff) | |
download | manaserv-6652688b1f72920a9b0d43a83f40f010e11198c2.tar.gz manaserv-6652688b1f72920a9b0d43a83f40f010e11198c2.tar.bz2 manaserv-6652688b1f72920a9b0d43a83f40f010e11198c2.tar.xz manaserv-6652688b1f72920a9b0d43a83f40f010e11198c2.zip |
Misc fixes with guild
Diffstat (limited to 'src/chat-server')
-rw-r--r-- | src/chat-server/chathandler.cpp | 6 | ||||
-rw-r--r-- | src/chat-server/guild.hpp | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/chat-server/chathandler.cpp b/src/chat-server/chathandler.cpp index 43a917ff..d19aa8cf 100644 --- a/src/chat-server/chathandler.cpp +++ b/src/chat-server/chathandler.cpp @@ -695,8 +695,10 @@ ChatHandler::handleGuildRetrieveMembers(ChatClient &client, MessageIn &msg) { reply.writeByte(ERRMSG_OK); reply.writeShort(guildId); - for(std::list<GuildMember*>::const_iterator itr = guild->getMembers().begin(); - itr != guild->getMembers().end(); ++itr) + std::list<GuildMember*> memberList = guild->getMembers(); + std::list<GuildMember*>::const_iterator itr_end = memberList.end(); + for(std::list<GuildMember*>::iterator itr = memberList.begin(); + itr != itr_end; ++itr) { reply.writeString((*itr)->getName()); reply.writeByte(mPlayerMap.find((*itr)->getName()) != mPlayerMap.end()); diff --git a/src/chat-server/guild.hpp b/src/chat-server/guild.hpp index ae8120f4..050dc17f 100644 --- a/src/chat-server/guild.hpp +++ b/src/chat-server/guild.hpp @@ -124,7 +124,7 @@ class Guild /** * Returns the name of the guild. */ - const std::string& getName() const + std::string getName() const { return mName; } /** |