diff options
author | George Hazan <george.hazan@gmail.com> | 2012-09-27 11:45:24 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-09-27 11:45:24 +0000 |
commit | 6035c2ae283bd8743a7484ed8796bd845afec4d5 (patch) | |
tree | 8ea6f8f48b0bf40940104232109b768573010c81 /protocols | |
parent | ff29f186b04d8bbddef31411e1d6dee4b48474ab (diff) |
fix for status messages
git-svn-id: http://svn.miranda-ng.org/main/trunk@1679 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/MRA/MraProto.cpp | 12 | ||||
-rw-r--r-- | protocols/MRA/Sdk/timefuncs.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/protocols/MRA/MraProto.cpp b/protocols/MRA/MraProto.cpp index 5b4ea2ac4e..4694f956bb 100644 --- a/protocols/MRA/MraProto.cpp +++ b/protocols/MRA/MraProto.cpp @@ -715,20 +715,20 @@ HANDLE CMraProto::GetAwayMsg(HANDLE hContact) if (!m_bLoggedIn || ! hContact)
return 0;
- CHAR szStatusDesc[MICBLOG_STATUS_MAX+MICBLOG_STATUS_MAX+MAX_PATH], szBlogStatus[MICBLOG_STATUS_MAX+4], szTime[64];
+ TCHAR szStatusDesc[MICBLOG_STATUS_MAX+MICBLOG_STATUS_MAX+MAX_PATH], szBlogStatus[MICBLOG_STATUS_MAX+4], szTime[64];
DWORD dwTime;
size_t dwStatusDescSize;
int iRet = 0;
- SYSTEMTIME stBlogStatusTime = {0};
- if ( mraGetStaticStringA(hContact, DBSETTING_BLOGSTATUS, szBlogStatus, SIZEOF(szBlogStatus), NULL)) {
+ if ( mraGetStaticStringW(hContact, DBSETTING_BLOGSTATUS, szBlogStatus, SIZEOF(szBlogStatus), NULL)) {
+ SYSTEMTIME tt = {0};
dwTime = mraGetDword(hContact, DBSETTING_BLOGSTATUSTIME, 0);
- if (dwTime && MakeLocalSystemTimeFromTime32(dwTime, &stBlogStatusTime))
- mir_snprintf(szTime, SIZEOF(szTime), "%04ld.%02ld.%02ld %02ld:%02ld: ", stBlogStatusTime.wYear, stBlogStatusTime.wMonth, stBlogStatusTime.wDay, stBlogStatusTime.wHour, stBlogStatusTime.wMinute);
+ if (dwTime && MakeLocalSystemTimeFromTime32(dwTime, &tt))
+ mir_sntprintf(szTime, SIZEOF(szTime), _T("%04ld.%02ld.%02ld %02ld:%02ld: "), tt.wYear, tt.wMonth, tt.wDay, tt.wHour, tt.wMinute);
else
szTime[0] = 0;
- dwStatusDescSize = mir_snprintf(szStatusDesc, SIZEOF(szStatusDesc), "%s%s", szTime, szBlogStatus);
+ dwStatusDescSize = mir_sntprintf(szStatusDesc, SIZEOF(szStatusDesc), _T("%s%s"), szTime, szBlogStatus);
iRet = GetTickCount();
ProtoBroadcastAckAsynchEx(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)iRet, (LPARAM)szStatusDesc, dwStatusDescSize);
}
diff --git a/protocols/MRA/Sdk/timefuncs.h b/protocols/MRA/Sdk/timefuncs.h index e170b0acd2..3b25b99787 100644 --- a/protocols/MRA/Sdk/timefuncs.h +++ b/protocols/MRA/Sdk/timefuncs.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- */ + */
|