diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-06-18 13:45:19 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-06-18 13:45:19 +0000 |
commit | 274074928c2ea794fd88c8f25c041852aabe66c2 (patch) | |
tree | ce8b2d6f7f9b0bc7d47be44d44625bd7394db8f2 /tipper/subst.cpp | |
parent | 30d7e221818b5646e018489342fa577073e42948 (diff) |
patch by goerge :)
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@205 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'tipper/subst.cpp')
-rw-r--r-- | tipper/subst.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/tipper/subst.cpp b/tipper/subst.cpp index 58bb5c4..aeed3ac 100644 --- a/tipper/subst.cpp +++ b/tipper/subst.cpp @@ -139,13 +139,19 @@ TCHAR *GetLastMessageText(HANDLE hContact) { if(dbei.cbBlob == 0 || dbei.pBlob == 0) return 0;
TCHAR *msg = 0;
- unsigned int msglen = strlen((char *)dbei.pBlob) + 1;
-
- // does blob contain unicode message?
- if(msglen < dbei.cbBlob) {
- msg = w2t((wchar_t *)(&dbei.pBlob[msglen]));
- } else {
- msg = a2t((char *)dbei.pBlob);
+ if ( ServiceExists( MS_DB_EVENT_GETTEXT )) {
+ TCHAR *buf = DbGetEventTextT( &dbei, CP_ACP );
+ msg = _tcsdup( buf );
+ mir_free( buf );
+ }
+ else {
+ unsigned int msglen = strlen((char *)dbei.pBlob) + 1;
+
+ // does blob contain unicode message?
+ if(msglen < dbei.cbBlob)
+ msg = w2t((wchar_t *)(&dbei.pBlob[msglen]));
+ else
+ msg = a2t((char *)dbei.pBlob);
}
StripBBCodesInPlace(msg);
@@ -444,3 +450,4 @@ bool GetValueText(HANDLE hContact, const DisplayItem &di, TCHAR *buff, int buffl }
+
|