summaryrefslogtreecommitdiff
path: root/messages.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2012-05-19 01:43:48 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2012-05-19 01:43:48 +0300
commit9026615fea720ca69d3a3480a69e32e5432db69b (patch)
tree10e18a6b7bce1427cb04dafd4a5772123c974050 /messages.cpp
parentec0c325b00df0576ecf6f159e6ea4b6f72a13e49 (diff)
fixed one more metacontacts problem
added option to remove own tags in outgoing messages (useful to quote)
Diffstat (limited to 'messages.cpp')
-rwxr-xr-xmessages.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/messages.cpp b/messages.cpp
index 74d0c44..6e69a2a 100755
--- a/messages.cpp
+++ b/messages.cpp
@@ -627,6 +627,18 @@ int SendMsgSvc_func(HANDLE hContact, char *msg, DWORD flags)
str.append(tmp);
mir_free(tmp);
}
+ if(bStripTags && bAppendTags)
+ {
+ std::wstring::size_type p;
+ for(p = str.find(inopentag); p != std::wstring::npos; p = str.find(inopentag))
+ str.erase(p, _tcslen(inopentag));
+ for(p = str.find(inclosetag); p != std::wstring::npos; p = str.find(inclosetag))
+ str.erase(p, _tcslen(inclosetag));
+ for(p = str.find(outopentag); p != std::wstring::npos; p = str.find(outopentag))
+ str.erase(p, _tcslen(outopentag));
+ for(p = str.find(outclosetag); p != std::wstring::npos; p = str.find(outclosetag))
+ str.erase(p, _tcslen(outclosetag));
+ }
/* for(std::wstring::size_type i = str.find(_T("\r\n")); i != std::wstring::npos; i = str.find(_T("\r\n"), i+1))
str.replace(i, 2, _T("\n")); */
string out;