Adding code for private chat messages (server side). These messages are not allowed within a game. Adding config option to disable brute force protection.
This commit is contained in:
@@ -209,6 +209,25 @@ ClientThread::SendLobbyChatMessage(const std::string &msg)
|
||||
m_ioService->post(boost::bind(&ClientThread::SendSessionPacket, shared_from_this(), packet));
|
||||
}
|
||||
|
||||
void
|
||||
ClientThread::SendPrivateChatMessage(unsigned targetPlayerId, const std::string &msg)
|
||||
{
|
||||
// Warning: This function is called in the context of the GUI thread.
|
||||
// Create a network packet containing the chat message.
|
||||
boost::shared_ptr<NetPacket> packet(new NetPacket(NetPacket::Alloc));
|
||||
packet->GetMsg()->present = PokerTHMessage_PR_chatRequestMessage;
|
||||
ChatRequestMessage_t *netChat = &packet->GetMsg()->choice.chatRequestMessage;
|
||||
OCTET_STRING_fromBuf(&netChat->chatText,
|
||||
msg.c_str(),
|
||||
msg.length());
|
||||
|
||||
netChat->chatRequestType.present = chatRequestType_PR_chatRequestTypePrivate;
|
||||
netChat->chatRequestType.choice.chatRequestTypePrivate.targetPlayerId = targetPlayerId;
|
||||
|
||||
// Just dump the packet.
|
||||
m_ioService->post(boost::bind(&ClientThread::SendSessionPacket, shared_from_this(), packet));
|
||||
}
|
||||
|
||||
void
|
||||
ClientThread::SendJoinFirstGame(const std::string &password)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user