diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-06-24 19:52:16 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-06-24 19:52:16 +0000 |
commit | f42360672d6cb4cff042a6a2426fb767dcd55d8c (patch) | |
tree | 7163fdd805f98ce485329fba4f441eab0154e7f4 | |
parent | 60747f7048f064d59ec1497962446e674e5ad4e3 (diff) |
SkypeWeb: Call duration fix.
git-svn-id: http://svn.miranda-ng.org/main/trunk@14368 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/SkypeWeb/src/skype_history_sync.cpp | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_messages.cpp | 11 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/stdafx.h | 2 |
3 files changed, 12 insertions, 3 deletions
diff --git a/protocols/SkypeWeb/src/skype_history_sync.cpp b/protocols/SkypeWeb/src/skype_history_sync.cpp index ef57c93e8a..9638e278a8 100644 --- a/protocols/SkypeWeb/src/skype_history_sync.cpp +++ b/protocols/SkypeWeb/src/skype_history_sync.cpp @@ -131,7 +131,7 @@ void CSkypeProto::OnGetServerHistory(const NETLIBHTTPREQUEST *response) if (iDuration != NULL)
{
hours = iDuration / 3600;
- mins = iDuration / 60;
+ mins = ((iDuration / 60) - (hours * 60));
sec = iDuration % 60;
}
else
diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp index 240d57cf73..baf3d242c3 100644 --- a/protocols/SkypeWeb/src/skype_messages.cpp +++ b/protocols/SkypeWeb/src/skype_messages.cpp @@ -67,6 +67,14 @@ int CSkypeProto::OnSendMessage(MCONTACT hContact, int, const char *szMessage) debugLogA(__FUNCTION__ " clientmsgid = %d", param->hMessage);
+ /*TCHAR *tszMessage = mir_utf8decodeT(szMessage);
+ int len = EscapeXML(tszMessage, _tcslen(tszMessage), NULL, 0);
+ TCHAR *buff = new TCHAR[len+1];
+ buff[len] = '\0';
+ EscapeXML(tszMessage, _tcslen(tszMessage), buff, len);
+ char *szNewMessage = mir_utf8encodeT(buff);
+ delete[] buff;*/
+
if (strncmp(szMessage, "/me ", 4) == 0)
SendRequest(new SendActionRequest(m_szRegToken, m_szSelfSkypeName, param->hMessage, &szMessage[4], m_szServer), &CSkypeProto::OnMessageSent, param);
else
@@ -223,10 +231,11 @@ void CSkypeProto::OnPrivateMessageEvent(const JSONNode &node) {
CMStringA chours = "", cmins = "", csec = "";
int hours = 0, mins = 0, sec = 0;
+
if (iDuration != NULL)
{
hours = iDuration / 3600;
- mins = iDuration / 60;
+ mins = ((iDuration / 60) - (hours * 60));
sec = iDuration % 60;
}
else
diff --git a/protocols/SkypeWeb/src/stdafx.h b/protocols/SkypeWeb/src/stdafx.h index bdc07e528a..a2be43094b 100644 --- a/protocols/SkypeWeb/src/stdafx.h +++ b/protocols/SkypeWeb/src/stdafx.h @@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include <vector>
#include <regex>
#include <map>
-
+#include <atlenc.h>
#include <newpluginapi.h>
#include <m_protoint.h>
|