summaryrefslogtreecommitdiff
path: root/plugins/Scriver
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Scriver')
-rw-r--r--plugins/Scriver/src/chat_window.cpp9
-rw-r--r--plugins/Scriver/src/globals.cpp2
-rw-r--r--plugins/Scriver/src/msgdialog.cpp6
-rw-r--r--plugins/Scriver/src/msglog.cpp4
4 files changed, 10 insertions, 11 deletions
diff --git a/plugins/Scriver/src/chat_window.cpp b/plugins/Scriver/src/chat_window.cpp
index f53118c989..5021e20fb0 100644
--- a/plugins/Scriver/src/chat_window.cpp
+++ b/plugins/Scriver/src/chat_window.cpp
@@ -375,11 +375,10 @@ void CChatRoomDlg::onChange_Message(CCtrlEdit*)
/////////////////////////////////////////////////////////////////////////////////////////
-static void __cdecl phase2(void *lParam)
+static void __cdecl phase2(SESSION_INFO *si)
{
Thread_SetName("Scriver: phase2");
- SESSION_INFO *si = (SESSION_INFO*)lParam;
Sleep(30);
if (si && si->pDlg)
si->pDlg->RedrawLog2();
@@ -401,7 +400,7 @@ void CChatRoomDlg::RedrawLog()
index++;
}
StreamInEvents(pLog, true);
- mir_forkthread(phase2, m_si);
+ mir_forkThread<SESSION_INFO>(phase2, m_si);
}
else StreamInEvents(m_si->pLogEnd, true);
}
@@ -677,8 +676,8 @@ LRESULT CChatRoomDlg::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
return 0;
}
if (db_get_b(0, SRMM_MODULE, SRMSGSET_SENDONDBLENTER, SRMSGDEFSET_SENDONDBLENTER)) {
- if (m_iLastEnterTime + 2 < time(nullptr))
- m_iLastEnterTime = time(nullptr);
+ if (m_iLastEnterTime + 2 < time(0))
+ m_iLastEnterTime = time(0);
else {
m_message.SendMsg(WM_KEYDOWN, VK_BACK, 0);
m_message.SendMsg(WM_KEYUP, VK_BACK, 0);
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp
index 9d5f880dc3..058f0d5286 100644
--- a/plugins/Scriver/src/globals.cpp
+++ b/plugins/Scriver/src/globals.cpp
@@ -142,7 +142,7 @@ static int ackevent(WPARAM, LPARAM lParam)
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_UTF | DBEF_SENT | ((item->flags & PREF_RTL) ? DBEF_RTL : 0);
dbei.szModule = GetContactProto(hContact);
- dbei.timestamp = time(nullptr);
+ dbei.timestamp = time(0);
dbei.cbBlob = (int)mir_strlen(item->sendBuffer) + 1;
dbei.pBlob = (PBYTE)item->sendBuffer;
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 0ea68c5da6..f40d639084 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -195,8 +195,8 @@ void CSrmmWindow::OnInitDialog()
SetTimer(m_hwnd, TIMERID_TYPE, 1000, nullptr);
m_lastEventType = -1;
- m_lastEventTime = time(nullptr);
- m_startTime = time(nullptr);
+ m_lastEventTime = time(0);
+ m_startTime = time(0);
m_bUseRtl = db_get_b(m_hContact, SRMM_MODULE, "UseRTL", 0) != 0;
m_bUseIEView = g_dat.ieviewInstalled ? (g_dat.flags & SMF_USEIEVIEW) != 0 : false;
@@ -322,7 +322,7 @@ void CSrmmWindow::OnInitDialog()
case LOADHISTORY_TIME:
if (m_hDbEventFirst == 0) {
- dbei.timestamp = time(nullptr);
+ dbei.timestamp = time(0);
hPrevEvent = db_event_last(m_hContact);
}
else {
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp
index 74c7d1330c..f388f9eae8 100644
--- a/plugins/Scriver/src/msglog.cpp
+++ b/plugins/Scriver/src/msglog.cpp
@@ -169,7 +169,7 @@ static EventData* GetTestEvent(DWORD flags)
evt->eventType = EVENTTYPE_MESSAGE;
evt->dwFlags = IEEDF_READ | flags;
evt->dwFlags |= IEEDF_UNICODE_TEXT | IEEDF_UNICODE_NICK | IEEDF_UNICODE_TEXT2;
- evt->time = time(nullptr);
+ evt->time = time(0);
return evt;
}
@@ -333,7 +333,7 @@ wchar_t* TimestampToString(DWORD dwFlags, time_t check, int mode)
format[0] = '\0';
if ((mode == 0 || mode == 1) && (dwFlags & SMF_SHOWDATE)) {
struct tm tm_now, tm_today;
- time_t now = time(nullptr);
+ time_t now = time(0);
time_t today;
tm_now = *localtime(&now);
tm_today = tm_now;