summaryrefslogtreecommitdiff
path: root/src/net/guildhandler.cpp
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2008-03-12 10:44:11 +0000
committerDavid Athay <ko2fan@gmail.com>2008-03-12 10:44:11 +0000
commit3a275cc81fe9aa1cb6736cdf12211e13e93cf2cf (patch)
tree7908381183fea865b53814e591aceae17c7a6cc2 /src/net/guildhandler.cpp
parent16e99dc852affbc8b149d35037694dcdd25948e6 (diff)
downloadmana-3a275cc81fe9aa1cb6736cdf12211e13e93cf2cf.tar.gz
mana-3a275cc81fe9aa1cb6736cdf12211e13e93cf2cf.tar.bz2
mana-3a275cc81fe9aa1cb6736cdf12211e13e93cf2cf.tar.xz
mana-3a275cc81fe9aa1cb6736cdf12211e13e93cf2cf.zip
Added ability to quit guilds.
Diffstat (limited to 'src/net/guildhandler.cpp')
-rw-r--r--src/net/guildhandler.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/net/guildhandler.cpp b/src/net/guildhandler.cpp
index 88528584..0b36f8e4 100644
--- a/src/net/guildhandler.cpp
+++ b/src/net/guildhandler.cpp
@@ -25,8 +25,9 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
*
- * $Id$
+ * $Id:$
*/
+
#include <iostream>
#include "guildhandler.h"
@@ -53,6 +54,7 @@ GuildHandler::GuildHandler()
CPMSG_GUILD_LEFT,
CPMSG_GUILD_INVITED,
CPMSG_GUILD_REJOIN,
+ CPMSG_GUILD_QUIT_RESPONSE,
0
};
handledMessages = _messages;
@@ -131,6 +133,16 @@ void GuildHandler::handleMessage(MessageIn &msg)
joinedGuild(msg);
} break;
+
+ case CPMSG_GUILD_QUIT_RESPONSE:
+ {
+ logger->log("Received CPMSG_GUILD_QUIT_RESPONSE");
+
+ if (msg.readInt8() == ERRMSG_OK)
+ {
+ guildWindow->removeTab();
+ }
+ } break;
}
}