diff options
author | George Hazan <ghazan@miranda.im> | 2017-01-23 18:52:14 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-01-23 18:52:14 +0300 |
commit | 35c6f6ccbb11f24a1385c5296a0f2b32c0b90dc9 (patch) | |
tree | 3e40f085a7114254966ddadafd1b92388c85b54e /protocols/MSN/src | |
parent | ac6a2d3c5a668324d4115305a621a81e4b5d99fb (diff) |
no need to implement the same code in each plugin
Diffstat (limited to 'protocols/MSN/src')
-rw-r--r-- | protocols/MSN/src/msn_chat.cpp | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_libstr.cpp | 12 | ||||
-rw-r--r-- | protocols/MSN/src/stdafx.h | 1 |
3 files changed, 1 insertions, 14 deletions
diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp index 0f5551f253..605577750c 100644 --- a/protocols/MSN/src/msn_chat.cpp +++ b/protocols/MSN/src/msn_chat.cpp @@ -480,7 +480,7 @@ int CMsnProto::MSN_GCEventHook(WPARAM, LPARAM lParam) if (gch->ptszText && gch->ptszText[0]) {
GCThreadData* thread = MSN_GetThreadByChatId(gch->pDest->ptszID);
if (thread) {
- wchar_t* pszMsg = UnEscapeChatTags(NEWWSTR_ALLOCA(gch->ptszText));
+ wchar_t* pszMsg = Chat_UnescapeTags(NEWWSTR_ALLOCA(gch->ptszText));
rtrimw(pszMsg); // remove the ending linebreak
msnNsThread->sendMessage('N', thread->szEmail, thread->netId, UTF8(pszMsg), 0);
diff --git a/protocols/MSN/src/msn_libstr.cpp b/protocols/MSN/src/msn_libstr.cpp index 5e5d834067..7f543bc1b7 100644 --- a/protocols/MSN/src/msn_libstr.cpp +++ b/protocols/MSN/src/msn_libstr.cpp @@ -322,18 +322,6 @@ wchar_t* EscapeChatTags(const wchar_t* pszText) return pszNewText;
}
-wchar_t* UnEscapeChatTags(wchar_t* str_in)
-{
- wchar_t *s = str_in, *d = str_in;
- while (*s) {
- if ((*s == '%' && s[1] == '%') || (*s == '\n' && s[1] == '\n'))
- s++;
- *d++ = *s++;
- }
- *d = 0;
- return str_in;
-}
-
#pragma comment(lib, "Rpcrt4.lib")
char* getNewUuid(void)
diff --git a/protocols/MSN/src/stdafx.h b/protocols/MSN/src/stdafx.h index e0ea208c9c..633b842f78 100644 --- a/protocols/MSN/src/stdafx.h +++ b/protocols/MSN/src/stdafx.h @@ -240,7 +240,6 @@ time_t IsoToUnixTime(const char *stamp); time_t MsnTSToUnixtime(const char *pszTS);
wchar_t* EscapeChatTags(const wchar_t* pszText);
-wchar_t* UnEscapeChatTags(wchar_t* str_in);
void overrideStr(wchar_t*& dest, const wchar_t* src, bool unicode, const wchar_t* def = NULL);
|