diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2006-11-28 00:43:38 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2006-11-28 00:43:38 +0000 |
commit | 1544759bd9b2418f5929680adf9b66e727f35d98 (patch) | |
tree | 6b08d92753649dcf8464d572dfe20c548a2bfd25 /tipper/subst.cpp | |
parent | 0a7c9bab72e6bc7a6cfbd0ac908f9c35b5eb31d9 (diff) |
patch for fontservice ansi/unicode services by TioDuke
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@64 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'tipper/subst.cpp')
-rw-r--r-- | tipper/subst.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tipper/subst.cpp b/tipper/subst.cpp index 683c87a..92f35ef 100644 --- a/tipper/subst.cpp +++ b/tipper/subst.cpp @@ -91,7 +91,12 @@ bool uid(HANDLE hContact, TCHAR *buff, int bufflen) { _ltot(ci.dVal, buff, 10);
break;
case CNFT_ASCIIZ:
- a2t((char *)ci.pszVal, buff, bufflen); // what's up with TCHAR in CONTACTINFO?!?!?
+ if(unicode_system) {
+ //w2t((char *)ci.pszVal, buff, bufflen); // what's up with TCHAR in CONTACTINFO?!?!?
+ w2t((wchar_t *)ci.pszVal, buff, bufflen);
+ } else {
+ a2t((char *)ci.pszVal, buff, bufflen);
+ }
break;
default:
return false;
@@ -142,9 +147,9 @@ TCHAR *GetStatusMessageText(HANDLE hContact) { TCHAR *ret = 0; DBVARIANT dbv; if(!DBGetContactSettingTString(hContact, MODULE, "TempStatusMsg", &dbv)) { - if(_tcslen(dbv.ptszVal)) { + if(dbv.ptszVal && dbv.ptszVal[0]) { ret = _tcsdup(dbv.ptszVal); - StripBBCodesInPlace(ret); // todo - fix for ansi build + StripBBCodesInPlace(ret); } else CallContactService(hContact, PSS_GETAWAYMSG, 0, 0); DBFreeVariant(&dbv);
/*
|