diff options
-rw-r--r-- | src/net/tmwserv/chatserver/party.cpp | 10 | ||||
-rw-r--r-- | src/net/tmwserv/chatserver/party.h | 5 | ||||
-rw-r--r-- | src/net/tmwserv/partyhandler.cpp | 12 | ||||
-rw-r--r-- | tmw.cbp | 2 |
4 files changed, 27 insertions, 2 deletions
diff --git a/src/net/tmwserv/chatserver/party.cpp b/src/net/tmwserv/chatserver/party.cpp index e5bdd861..272bcbd7 100644 --- a/src/net/tmwserv/chatserver/party.cpp +++ b/src/net/tmwserv/chatserver/party.cpp @@ -50,6 +50,16 @@ void Net::ChatServer::Party::acceptInvite(const std::string &name) Net::ChatServer::connection->send(msg); } +void Net::ChatServer::Party::rejectInvite(const std::string &name) +{ + logger->log("Sending PCMSG_PARTY_REJECT_INVITE"); + MessageOut msg(PCMSG_PARTY_REJECT_INVITE); + + msg.writeString(name); + + Net::ChatServer::connection->send(msg); +} + void Net::ChatServer::Party::getPartyMembers() { logger->log("Sending PCMSG_PARTY_GET_MEMBERS"); diff --git a/src/net/tmwserv/chatserver/party.h b/src/net/tmwserv/chatserver/party.h index b3f0020b..3850c283 100644 --- a/src/net/tmwserv/chatserver/party.h +++ b/src/net/tmwserv/chatserver/party.h @@ -41,6 +41,11 @@ namespace Net void acceptInvite(const std::string &name); /** + * Reject an invite from another player to join their party + */ + void rejectInvite(const std::string &name); + + /** * Get a list of party members */ void getPartyMembers(); 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) @@ -613,10 +613,12 @@ <Unit filename="src/net/ea/logouthandler.cpp"> <Option target="eAthena" /> <Option target="Unix eAthena" /> + <Option target="UNIX eAthena" /> </Unit> <Unit filename="src/net/ea/logouthandler.h"> <Option target="eAthena" /> <Option target="Unix eAthena" /> + <Option target="UNIX eAthena" /> </Unit> <Unit filename="src/net/ea/maphandler.cpp"> <Option target="eAthena" /> |