summaryrefslogtreecommitdiff
path: root/protocols/Discord
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Discord')
-rw-r--r--protocols/Discord/src/dispatch.cpp6
-rw-r--r--protocols/Discord/src/guilds.cpp4
-rw-r--r--protocols/Discord/src/utils.cpp4
3 files changed, 7 insertions, 7 deletions
diff --git a/protocols/Discord/src/dispatch.cpp b/protocols/Discord/src/dispatch.cpp
index 53c561aaf2..aa31c69f5f 100644
--- a/protocols/Discord/src/dispatch.cpp
+++ b/protocols/Discord/src/dispatch.cpp
@@ -144,7 +144,7 @@ void CDiscordProto::OnCommandChannelUpdated(const JSONNode &pRoot)
GCEVENT gce = { m_szModuleName, pUser->wszUsername, GC_EVENT_TOPIC };
gce.ptszText = wszTopic;
- gce.time = time(nullptr);
+ gce.time = time(0);
Chat_Event(&gce);
}
}
@@ -226,7 +226,7 @@ void CDiscordProto::OnCommandGuildMemberRemoved(const JSONNode &pRoot)
continue;
GCEVENT gce = { m_szModuleName, pUser->wszUsername, GC_EVENT_PART };
- gce.time = time(nullptr);
+ gce.time = time(0);
gce.ptszUID = wszUserId;
Chat_Event(&gce);
}
@@ -260,7 +260,7 @@ void CDiscordProto::OnCommandGuildMemberUpdated(const JSONNode &pRoot)
}
GCEVENT gce = { m_szModuleName, it->wszUsername, GC_EVENT_NICK };
- gce.time = time(nullptr);
+ gce.time = time(0);
gce.ptszUID = wszUserId;
gce.ptszNick = wszOldNick;
gce.ptszText = gm->wszNick;
diff --git a/protocols/Discord/src/guilds.cpp b/protocols/Discord/src/guilds.cpp
index 78eb0a1507..0bb61ed52a 100644
--- a/protocols/Discord/src/guilds.cpp
+++ b/protocols/Discord/src/guilds.cpp
@@ -114,7 +114,7 @@ CDiscordUser* CDiscordProto::ProcessGuildChannel(CDiscordGuild *pGuild, const JS
Chat_SetStatusbarText(m_szModuleName, wszChannelId, wszTopic);
GCEVENT gce = { m_szModuleName, wszChannelId, GC_EVENT_TOPIC };
- gce.time = time(nullptr);
+ gce.time = time(0);
gce.ptszText = wszTopic;
Chat_Event(&gce);
}
@@ -151,7 +151,7 @@ CDiscordUser* CDiscordProto::ProcessGuildChannel(CDiscordGuild *pGuild, const JS
void CDiscordProto::AddUserToChannel(const CDiscordUser &pChannel, const CDiscordGuildMember &pUser)
{
GCEVENT gce = { m_szModuleName, pChannel.wszUsername, GC_EVENT_JOIN };
- gce.time = time(nullptr);
+ gce.time = time(0);
gce.dwFlags = GCEF_SILENT;
wchar_t wszUserId[100];
diff --git a/protocols/Discord/src/utils.cpp b/protocols/Discord/src/utils.cpp
index 5be21385ec..cd890f2514 100644
--- a/protocols/Discord/src/utils.cpp
+++ b/protocols/Discord/src/utils.cpp
@@ -37,7 +37,7 @@ time_t StringToDate(const CMStringW &str)
struct tm T = { 0 };
int boo;
if (swscanf(str, L"%04d-%02d-%02dT%02d:%02d:%02d.%d", &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, &boo) != 7)
- return time(nullptr);
+ return time(0);
T.tm_year -= 1900;
T.tm_mon--;
@@ -241,7 +241,7 @@ void CDiscordProto::ProcessType(CDiscordUser *pUser, const JSONNode &pRoot)
DB_AUTH_BLOB blob(pUser->hContact, T2Utf(pUser->wszUsername), nullptr, nullptr, szId, nullptr);
PROTORECVEVENT pre = { 0 };
- pre.timestamp = (DWORD)time(nullptr);
+ pre.timestamp = (DWORD)time(0);
pre.lParam = blob.size();
pre.szMessage = blob;
ProtoChainRecv(pUser->hContact, PSR_AUTH, 0, (LPARAM)&pre);