diff options
author | George Hazan <ghazan@miranda.im> | 2017-12-10 15:24:14 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-12-10 15:24:14 +0300 |
commit | c9265783b1bf4a9cea1fd63e633ced6e66a154fc (patch) | |
tree | e64e3ec5b96adcb0121e2e6395f0767766bc5195 /protocols | |
parent | 926a493a89fbe3d56b7f2b5a3160dc949b401529 (diff) |
Miranda idle code cleaning
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/AimOscar/src/services.cpp | 4 | ||||
-rw-r--r-- | protocols/FacebookRM/src/proto.cpp | 4 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_events.cpp | 4 | ||||
-rw-r--r-- | protocols/Steam/src/steam_events.cpp | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/protocols/AimOscar/src/services.cpp b/protocols/AimOscar/src/services.cpp index 1012a1c611..5ce4ab554f 100644 --- a/protocols/AimOscar/src/services.cpp +++ b/protocols/AimOscar/src/services.cpp @@ -49,8 +49,8 @@ int CAimProto::OnIdleChanged(WPARAM, LPARAM lParam) if (bIdle) //don't want to change idle time if we are already idle
{
- MIRANDA_IDLE_INFO mii = { sizeof(mii) };
- CallService(MS_IDLE_GETIDLEINFO, 0, (LPARAM)&mii);
+ MIRANDA_IDLE_INFO mii;
+ Idle_GetInfo(mii);
m_idle = 1;
aim_set_idle(m_hServerConn, m_seqno, mii.idleTime * 60);
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index c4f33dd222..17698d6e29 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -383,8 +383,8 @@ int FacebookProto::OnIdleChanged(WPARAM, LPARAM lParam) if (idle) { // User started being idle - MIRANDA_IDLE_INFO mii = { sizeof(mii) }; - CallService(MS_IDLE_GETIDLEINFO, 0, (LPARAM)&mii); + MIRANDA_IDLE_INFO mii; + Idle_GetInfo(mii); // Compute time when user really became idle m_idleTS = time(nullptr) - mii.idleTime * 60; diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp index 46cfe9a356..ce10d6b7aa 100644 --- a/protocols/JabberG/src/jabber_events.cpp +++ b/protocols/JabberG/src/jabber_events.cpp @@ -187,8 +187,8 @@ int CJabberProto::OnIdleChanged(WPARAM, LPARAM lParam) }
if (lParam & IDF_ISIDLE) {
- MIRANDA_IDLE_INFO mii = { sizeof(mii) };
- CallService(MS_IDLE_GETIDLEINFO, 0, (LPARAM)&mii);
+ MIRANDA_IDLE_INFO mii;
+ Idle_GetInfo(mii);
m_tmJabberIdleStartTime = time(nullptr) - mii.idleTime * 60;
}
else m_tmJabberIdleStartTime = 0;
diff --git a/protocols/Steam/src/steam_events.cpp b/protocols/Steam/src/steam_events.cpp index 3697689ca4..ef2d59ed40 100644 --- a/protocols/Steam/src/steam_events.cpp +++ b/protocols/Steam/src/steam_events.cpp @@ -65,8 +65,8 @@ int CSteamProto::OnIdleChanged(WPARAM, LPARAM lParam) if (idle) { // User started being idle - MIRANDA_IDLE_INFO mii = { sizeof(mii) }; - CallService(MS_IDLE_GETIDLEINFO, 0, (LPARAM)&mii); + MIRANDA_IDLE_INFO mii; + Idle_GetInfo(mii); // Compute time when user really became idle m_idleTS = time(nullptr) - mii.idleTime * 60; |