summaryrefslogtreecommitdiff
path: root/protocols/MSN
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/MSN')
-rw-r--r--protocols/MSN/src/msn_auth.cpp8
-rw-r--r--protocols/MSN/src/msn_chat.cpp2
-rw-r--r--protocols/MSN/src/msn_commands.cpp14
-rw-r--r--protocols/MSN/src/msn_libstr.cpp2
-rw-r--r--protocols/MSN/src/msn_mail.cpp2
-rw-r--r--protocols/MSN/src/msn_misc.cpp4
-rw-r--r--protocols/MSN/src/stdafx.h2
7 files changed, 17 insertions, 17 deletions
diff --git a/protocols/MSN/src/msn_auth.cpp b/protocols/MSN/src/msn_auth.cpp
index 135ffaf6c1..e8c1fa4602 100644
--- a/protocols/MSN/src/msn_auth.cpp
+++ b/protocols/MSN/src/msn_auth.cpp
@@ -302,7 +302,7 @@ bool SkypeToken::Refresh(bool bForce)
time_t tExpires = (*root)["expiresIn"].as_int();
if (tExpires == 0)
tExpires = 86400;
- SetToken("skype_token " + szToken, time(nullptr) + tExpires);
+ SetToken("skype_token " + szToken, time(0) + tExpires);
bRet = true;
}
}
@@ -353,7 +353,7 @@ int CMsnProto::MSN_GetPassportAuth(void)
szPassword[99] = 0;
- time_t ts = time(nullptr);
+ time_t ts = time(0);
wchar_t szTs1[64], szTs2[64];
TimeZone_PrintTimeStamp(UTC_TIME_HANDLE, ts, L"I", szTs1, _countof(szTs1), 0);
@@ -404,7 +404,7 @@ int CMsnProto::MSN_GetPassportAuth(void)
ezxml_t xml_expires = ezxml_get(tokr, "wst:Lifetime", 0, "wsu:Expires", -1);
time_t expires;
- expires = xml_expires ? IsoToUnixTime(ezxml_txt(xml_expires)) : time(nullptr) + 86400;
+ expires = xml_expires ? IsoToUnixTime(ezxml_txt(xml_expires)) : time(0) + 86400;
if (mir_strcmp(addr, "http://Passport.NET/tb") == 0) {
@@ -722,7 +722,7 @@ bool CMsnProto::RefreshOAuth(const char *pszRefreshToken, const char *pszService
if (*ptExpires == 0)
bRet = false;
else
- *ptExpires += time(nullptr);
+ *ptExpires += time(0);
}
}
}
diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp
index 61397d677b..681a931702 100644
--- a/protocols/MSN/src/msn_chat.cpp
+++ b/protocols/MSN/src/msn_chat.cpp
@@ -482,7 +482,7 @@ int CMsnProto::MSN_GCEventHook(WPARAM, LPARAM lParam)
gce.dwFlags = GCEF_ADDTOLOG;
gce.ptszNick = bError ? L"" : dbv.ptszVal;
gce.ptszUID = mir_a2u(MyOptions.szEmail);
- gce.time = time(nullptr);
+ gce.time = time(0);
gce.ptszText = gch->ptszText;
gce.bIsMe = TRUE;
Chat_Event(&gce);
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp
index 5b0e0cd946..088e9acba3 100644
--- a/protocols/MSN/src/msn_commands.cpp
+++ b/protocols/MSN/src/msn_commands.cpp
@@ -233,7 +233,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para
}
if (cnt) {
PROTORECVEVENT pre = { 0 };
- pre.timestamp = (DWORD)time(nullptr);
+ pre.timestamp = (DWORD)time(0);
pre.szMessage = (char *)psr;
pre.lParam = cnt;
ProtoChainRecv(hContact, PSR_CONTACTS, 0, (LPARAM)&pre);
@@ -283,7 +283,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para
ezxml_free(xmli);
}
}
- else MSN_GCAddMessage(mChatID, hContact, email, time(nullptr), sentMsg, msgBody);
+ else MSN_GCAddMessage(mChatID, hContact, email, time(0), sentMsg, msgBody);
}
else if (hContact) {
if (!sentMsg) {
@@ -292,7 +292,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para
PROTORECVEVENT pre = { 0 };
pre.szMessage = (char*)msgBody;
pre.flags = (isRtl ? PREF_RTL : 0);
- pre.timestamp = (DWORD)time(nullptr);
+ pre.timestamp = (DWORD)time(0);
pre.lParam = 0;
ProtoChainRecvMsg(hContact, &pre);
}
@@ -303,7 +303,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT | DBEF_UTF | (haveWnd ? 0 : DBEF_READ) | (isRtl ? DBEF_RTL : 0);
dbei.szModule = m_szModuleName;
- dbei.timestamp = time(nullptr);
+ dbei.timestamp = time(0);
dbei.cbBlob = (unsigned)mir_strlen(msgBody) + 1;
dbei.pBlob = (PBYTE)msgBody;
db_event_add(hContact, &dbei);
@@ -459,7 +459,7 @@ void CMsnProto::MSN_ProcessURIObject(MCONTACT hContact, ezxml_t xmli)
PROTORECVFILE pre = { 0 };
pre.dwFlags = PRFF_UNICODE;
pre.fileCount = 1;
- pre.timestamp = time(nullptr);
+ pre.timestamp = time(0);
pre.descr.w = (desc = ezxml_child(xmli, "Description"))?mir_utf8decodeW(desc->txt):tComment;
pre.files.w = &ft->std.szCurrentFile.w;
pre.lParam = (LPARAM)ft;
@@ -477,7 +477,7 @@ void CMsnProto::MSN_ProcessURIObject(MCONTACT hContact, ezxml_t xmli)
ezxml_t urllnk;
if (urllnk=ezxml_child(xmli, "a")) msgtxt.AppendFormat(" %s", ezxml_txt(urllnk));
pre.szMessage = (char*)(const char*)msgtxt;
- pre.timestamp = (DWORD)time(nullptr);
+ pre.timestamp = (DWORD)time(0);
ProtoChainRecvMsg(hContact, &pre);
}
}
@@ -579,7 +579,7 @@ void CMsnProto::MSN_ProcessNLN(const char *userStatus, const char *wlid, char *u
int newStatus = MSNStatusToMiranda(userStatus);
setWord(hContact, "Status", newStatus != ID_STATUS_IDLE ? newStatus : ID_STATUS_AWAY);
- setDword(hContact, "IdleTS", newStatus != ID_STATUS_IDLE ? 0 : time(nullptr));
+ setDword(hContact, "IdleTS", newStatus != ID_STATUS_IDLE ? 0 : time(0));
}
if (cont) {
diff --git a/protocols/MSN/src/msn_libstr.cpp b/protocols/MSN/src/msn_libstr.cpp
index 5ff16d857c..c8780d771a 100644
--- a/protocols/MSN/src/msn_libstr.cpp
+++ b/protocols/MSN/src/msn_libstr.cpp
@@ -403,7 +403,7 @@ time_t MsnTSToUnixtime(const char *pszTS)
{
char szTS[16];
- if (!*pszTS) return time(nullptr);
+ if (!*pszTS) return time(0);
strncpy(szTS, pszTS, 10);
return (time_t)atoi(szTS);
}
diff --git a/protocols/MSN/src/msn_mail.cpp b/protocols/MSN/src/msn_mail.cpp
index 7673fd7a9f..30262e49c5 100644
--- a/protocols/MSN/src/msn_mail.cpp
+++ b/protocols/MSN/src/msn_mail.cpp
@@ -94,7 +94,7 @@ void CMsnProto::getOIMs(ezxml_t xmli)
MimeHeaders mailInfo;
const char* mailbody = mailInfo.readFromBuffer((char*)ezxml_txt(body));
- time_t evtm = time(nullptr);
+ time_t evtm = time(0);
const char* arrTime = mailInfo["X-OriginalArrivalTime"];
if (arrTime != nullptr) {
char szTime[32], *p;
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp
index 4e09b187f7..8912cc133a 100644
--- a/protocols/MSN/src/msn_misc.cpp
+++ b/protocols/MSN/src/msn_misc.cpp
@@ -86,7 +86,7 @@ void CMsnProto::MSN_AddAuthRequest(const char *email, const char *nick, const ch
DB_AUTH_BLOB blob(hContact, nick, nullptr, nullptr, email, reason);
PROTORECVEVENT pre = { 0 };
- pre.timestamp = (DWORD)time(nullptr);
+ pre.timestamp = (DWORD)time(0);
pre.lParam = blob.size();
pre.szMessage = blob;
ProtoChainRecv(hContact, PSR_AUTH, 0, (LPARAM)&pre);
@@ -710,7 +710,7 @@ void CMsnProto::MsnInvokeMyURL(bool ismail, const char* url)
if (p)
*p = 0;
- CMStringA post = HotmailLogin(CMStringA().Format(postdata, (unsigned)time(nullptr), ptrA(mir_urlEncode(url))));
+ CMStringA post = HotmailLogin(CMStringA().Format(postdata, (unsigned)time(0), ptrA(mir_urlEncode(url))));
if (!post.IsEmpty()) {
CMStringA hippy(passport);
hippy.AppendFormat("/ppsecure/sha1auth.srf?lc=%d&token=%s", itoa(langpref, passport, 10), ptrA(mir_urlEncode(post)));
diff --git a/protocols/MSN/src/stdafx.h b/protocols/MSN/src/stdafx.h
index dc4567fc45..a96e8a8efa 100644
--- a/protocols/MSN/src/stdafx.h
+++ b/protocols/MSN/src/stdafx.h
@@ -692,7 +692,7 @@ public:
bool Load();
void Save();
virtual bool Refresh(bool = false) { return false; }
- bool Expired(time_t t = time(nullptr));
+ bool Expired(time_t t = time(0));
void Clear();
const char *Token();
__forceinline operator char*() const { return m_pszToken; }