summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-06-01 16:48:18 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-06-01 16:52:15 +0300
commitf515f0b6947691d8416b9e8ea585afce97bca5c9 (patch)
tree4eaa8a8a4faef552d4ea1d0732a78dff960c9d26 /protocols
parent8e31deecd836353c7abe6d63754faebdd16645c5 (diff)
ICQ-WIM: auth requests to be launched only during new events reading
(cherry picked from commit 70920be7fba2c1ae4bca11ff34a879e4217debb6)
Diffstat (limited to 'protocols')
-rw-r--r--protocols/ICQ-WIM/src/server.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp
index e1c06b8236..b10f6c1cd5 100644
--- a/protocols/ICQ-WIM/src/server.cpp
+++ b/protocols/ICQ-WIM/src/server.cpp
@@ -391,17 +391,18 @@ void CIcqProto::ParseMessage(MCONTACT hContact, __int64 &lastMsgId, const JSONNo
// user added you
if (it["class"].as_mstring() == L"event" && it["eventTypeId"].as_mstring() == L"27:33000") {
- CMStringA id = getMStringA(hContact, DB_KEY_ID);
- int pos = id.Find('@');
- CMStringA nick = (pos == -1) ? id : id.Left(pos);
-
- DB::AUTH_BLOB blob(hContact, nick, nullptr, nullptr, id, nullptr);
-
- PROTORECVEVENT pre = {};
- pre.timestamp = (DWORD)time(0);
- pre.lParam = blob.size();
- pre.szMessage = blob;
- ProtoChainRecv(hContact, PSR_AUTH, 0, (LPARAM)&pre);
+ if (bLocalTime) {
+ CMStringA id = getMStringA(hContact, DB_KEY_ID);
+ int pos = id.Find('@');
+ CMStringA nick = (pos == -1) ? id : id.Left(pos);
+ DB::AUTH_BLOB blob(hContact, nick, nullptr, nullptr, id, nullptr);
+
+ PROTORECVEVENT pre = {};
+ pre.timestamp = (DWORD)time(0);
+ pre.lParam = blob.size();
+ pre.szMessage = blob;
+ ProtoChainRecv(hContact, PSR_AUTH, 0, (LPARAM)&pre);
+ }
return;
}
}