summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_messages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/SkypeWeb/src/skype_messages.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_messages.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp
index 33d0944ad7..bc0aa74669 100644
--- a/protocols/SkypeWeb/src/skype_messages.cpp
+++ b/protocols/SkypeWeb/src/skype_messages.cpp
@@ -284,8 +284,13 @@ void CSkypeProto::OnPrivateMessageEvent(JSONNODE *node)
if (iType == 1)
text.Append(Translate("Call started"));
else if (iType == 0)
- text.AppendFormat("%s\n%s: %d", Translate("Call ended"), Translate("Duration"), iDuration != NULL ? iDuration : 0);
-
+ {
+ int hours=0, mins=0, sec=0;
+ hours = iDuration != NULL ? iDuration / 3600 : 0;
+ mins = iDuration != NULL ? iDuration / 60 : 0;
+ sec = iDuration != NULL ? iDuration % 60 : 0;
+ text.AppendFormat("%s\n%s: %d:%d:%d", Translate("Call ended"), Translate("Duration"), hours, mins, sec);
+ }
if (IsMe(from))
AddMessageToDb(hContact, timestamp, DBEF_UTF | DBEF_SENT, clientMsgId, text.GetBuffer());
else