summaryrefslogtreecommitdiff
path: root/src/net/tmwserv/partyhandler.cpp
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2009-04-23 17:43:41 +0100
committerDavid Athay <ko2fan@gmail.com>2009-04-23 17:43:41 +0100
commitf676ce79cb51ac87d09619c09193e38431788270 (patch)
tree6e2bc688a6919809f72ffde540718a59d4269093 /src/net/tmwserv/partyhandler.cpp
parent0d439c39e99dbf1120dce784459176f744f70728 (diff)
downloadmana-f676ce79cb51ac87d09619c09193e38431788270.tar.gz
mana-f676ce79cb51ac87d09619c09193e38431788270.tar.bz2
mana-f676ce79cb51ac87d09619c09193e38431788270.tar.xz
mana-f676ce79cb51ac87d09619c09193e38431788270.zip
Added rejecting party invites.
Diffstat (limited to 'src/net/tmwserv/partyhandler.cpp')
-rw-r--r--src/net/tmwserv/partyhandler.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/net/tmwserv/partyhandler.cpp b/src/net/tmwserv/partyhandler.cpp
index 6a68ec95..01de1be8 100644
--- a/src/net/tmwserv/partyhandler.cpp
+++ b/src/net/tmwserv/partyhandler.cpp
@@ -50,6 +50,7 @@ PartyHandler::PartyHandler()
CPMSG_PARTY_QUIT_RESPONSE,
CPMSG_PARTY_NEW_MEMBER,
CPMSG_PARTY_MEMBER_LEFT,
+ CPMSG_PARTY_REJECTED,
0
};
handledMessages = _messages;
@@ -108,6 +109,12 @@ void PartyHandler::handleMessage(MessageIn &msg)
{
partyWindow->removeMember(msg.readString());
} break;
+
+ case CPMSG_PARTY_REJECTED:
+ {
+ std::string name = msg.readString();
+ localChatTab->chatLog(name + "rejected your invite.");
+ } break;
}
}
@@ -135,12 +142,13 @@ void PartyHandler::inviteResponse(const std::string &inviter, bool accept)
{
if (accept)
Net::ChatServer::Party::acceptInvite(inviter);
- // TODO: rejection
+ else
+ Net::ChatServer::Party::rejectInvite(inviter);
}
void PartyHandler::leave()
{
- // TODO
+ Net::ChatServer::Party::quitParty();
}
void PartyHandler::kick(Player *player)