summaryrefslogtreecommitdiffstats
path: root/src/CompositeChat.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/CompositeChat.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 '')
-rw-r--r--src/CompositeChat.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/CompositeChat.cpp b/src/CompositeChat.cpp
index 94f8a5901..918e4f90e 100644
--- a/src/CompositeChat.cpp
+++ b/src/CompositeChat.cpp
@@ -314,6 +314,35 @@ void cCompositeChat::UnderlineUrls(void)
+AString cCompositeChat::ExtractText(void) const
+{
+ AString Msg;
+ for (cParts::const_iterator itr = m_Parts.begin(), end = m_Parts.end(); itr != end; ++itr)
+ {
+ switch ((*itr)->m_PartType)
+ {
+ case ptText:
+ case ptClientTranslated:
+ case ptRunCommand:
+ case ptSuggestCommand:
+ {
+ Msg.append((*itr)->m_Text);
+ break;
+ }
+ case ptUrl:
+ {
+ Msg.append(((cUrlPart *)(*itr))->m_Url);
+ break;
+ }
+ } // switch (PartType)
+ } // for itr - m_Parts[]
+ return Msg;
+}
+
+
+
+
+
void cCompositeChat::AddStyle(AString & a_Style, const AString & a_AddStyle)
{
if (a_AddStyle.empty())