From 1544759bd9b2418f5929680adf9b66e727f35d98 Mon Sep 17 00:00:00 2001 From: sje Date: Tue, 28 Nov 2006 00:43:38 +0000 Subject: 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 --- tipper/subst.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tipper/subst.cpp') 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); /* -- cgit v1.2.3