diff options
author | George Hazan <george.hazan@gmail.com> | 2012-12-23 18:52:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-12-23 18:52:25 +0000 |
commit | 4b283b1cf3004aebbb1f4807456a2cd0fdb5f30c (patch) | |
tree | 00ee44be29c5ac306109eb2cd9d1fc7047644b3f /protocols/JabberG/src/jabber_groupchat.cpp | |
parent | af8c5b336e9609ed9c53b877dd7f57fb3d7194b9 (diff) |
- XEP-0136 support (server-side message history);
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@2816 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_groupchat.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_groupchat.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp index 407fe2f433..e80628ec8f 100644 --- a/protocols/JabberG/src/jabber_groupchat.cpp +++ b/protocols/JabberG/src/jabber_groupchat.cpp @@ -323,11 +323,9 @@ void CJabberProto::GroupchatJoinRoom(const TCHAR *server, const TCHAR *room, con if (lasteventtime > 0) {
_tzset();
lasteventtime += _timezone + 1;
- struct tm* time = localtime(&lasteventtime);
+
TCHAR lasteventdate[20 + 1];
- mir_sntprintf(lasteventdate, SIZEOF(lasteventdate), _T("%04d-%02d-%02dT%02d:%02d:%02dZ"),
- time->tm_year+1900, time->tm_mon+1, time->tm_mday, time->tm_hour, time->tm_min, time->tm_sec);
- x << XCHILD(_T("history")) << XATTR(_T("since"), lasteventdate);
+ x << XCHILD(_T("history")) << XATTR(_T("since"), time2str(lasteventtime, lasteventdate, SIZEOF(lasteventdate)));
}
}
@@ -1088,7 +1086,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) // Request room config
int iqId = SerialNext();
IqAdd(iqId, IQ_PROC_NONE, &CJabberProto::OnIqResultGetMuc);
- m_ThreadInfo->send(XmlNodeIq(_T("get"), iqId, item->jid) << XQUERY(xmlnsOwner));
+ m_ThreadInfo->send( XmlNodeIq(_T("get"), iqId, item->jid) << XQUERY(xmlnsOwner));
}
mir_free(room);
|