summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol125.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-03-31 22:51:14 +0200
committermadmaxoft <github@xoft.cz>2014-03-31 22:51:14 +0200
commit8126d9e66ef1ac90db2660ae357c9aa1c14c7126 (patch)
tree50b5d1fe0106761a31de387f4574b592bc9fb28d /src/Protocol/Protocol125.cpp
parentAPIDump: Added code completion support file to ZBS tutorial. (diff)
downloadcuberite-8126d9e66ef1ac90db2660ae357c9aa1c14c7126.tar
cuberite-8126d9e66ef1ac90db2660ae357c9aa1c14c7126.tar.gz
cuberite-8126d9e66ef1ac90db2660ae357c9aa1c14c7126.tar.bz2
cuberite-8126d9e66ef1ac90db2660ae357c9aa1c14c7126.tar.lz
cuberite-8126d9e66ef1ac90db2660ae357c9aa1c14c7126.tar.xz
cuberite-8126d9e66ef1ac90db2660ae357c9aa1c14c7126.tar.zst
cuberite-8126d9e66ef1ac90db2660ae357c9aa1c14c7126.zip
Diffstat (limited to 'src/Protocol/Protocol125.cpp')
-rw-r--r--src/Protocol/Protocol125.cpp23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/Protocol/Protocol125.cpp b/src/Protocol/Protocol125.cpp
index 69f4934d8..ea844c044 100644
--- a/src/Protocol/Protocol125.cpp
+++ b/src/Protocol/Protocol125.cpp
@@ -239,32 +239,11 @@ void cProtocol125::SendChat(const AString & a_Message)
void cProtocol125::SendChat(const cCompositeChat & a_Message)
{
// This version doesn't support composite messages, just extract each part's text and use it:
- AString Msg;
- const cCompositeChat::cParts & Parts = a_Message.GetParts();
- for (cCompositeChat::cParts::const_iterator itr = Parts.begin(), end = Parts.end(); itr != end; ++itr)
- {
- switch ((*itr)->m_PartType)
- {
- case cCompositeChat::ptText:
- case cCompositeChat::ptClientTranslated:
- case cCompositeChat::ptRunCommand:
- case cCompositeChat::ptSuggestCommand:
- {
- Msg.append((*itr)->m_Text);
- break;
- }
- case cCompositeChat::ptUrl:
- {
- Msg.append(((cCompositeChat::cUrlPart *)(*itr))->m_Url);
- break;
- }
- } // switch (PartType)
- } // for itr - Parts[]
// Send the message:
cCSLock Lock(m_CSPacket);
WriteByte (PACKET_CHAT);
- WriteString(Msg);
+ WriteString(a_Message.ExtractText());
Flush();
}