diff options
author | George Hazan <ghazan@miranda.im> | 2021-04-23 13:49:21 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-04-23 13:49:21 +0300 |
commit | 413700b665fcc1475410d2df2d92dff249b97bc2 (patch) | |
tree | d36d0fd0a380fb5f5e24c337ca6afeaf3f40500f | |
parent | b07aafea58d3af883587fdcadd817f5b1e6ed126 (diff) |
old junk extincted
-rw-r--r-- | protocols/WhatsAppWeb/src/proto.cpp | 2 | ||||
-rw-r--r-- | protocols/WhatsAppWeb/src/proto.h | 14 | ||||
-rw-r--r-- | protocols/WhatsAppWeb/src/server.cpp | 2 |
3 files changed, 4 insertions, 14 deletions
diff --git a/protocols/WhatsAppWeb/src/proto.cpp b/protocols/WhatsAppWeb/src/proto.cpp index 73fc4dc921..5b83cc647c 100644 --- a/protocols/WhatsAppWeb/src/proto.cpp +++ b/protocols/WhatsAppWeb/src/proto.cpp @@ -238,7 +238,7 @@ void WhatsAppProto::SearchAckThread(void *targ) HANDLE WhatsAppProto::SearchBasic(const wchar_t* id) { - if (isOffline()) + if (!isOnline()) return nullptr; // fake - we always accept search diff --git a/protocols/WhatsAppWeb/src/proto.h b/protocols/WhatsAppWeb/src/proto.h index e184faba67..3157fd2331 100644 --- a/protocols/WhatsAppWeb/src/proto.h +++ b/protocols/WhatsAppWeb/src/proto.h @@ -70,7 +70,7 @@ class WhatsAppProto : public PROTO<WhatsAppProto> } m_impl; - bool m_bTerminated, m_bOnline; + bool m_bTerminated; ptrW m_tszDefaultGroup; CMStringA m_szJid, m_szClientId, m_szClientToken; @@ -152,16 +152,8 @@ public: WhatsAppProto(const char *proto_name, const wchar_t *username); ~WhatsAppProto(); - inline bool isOnline() const - { return m_bOnline; - } - - inline bool isOffline() const - { return (m_iStatus == ID_STATUS_OFFLINE); - } - - inline bool isInvisible() const - { return (m_iStatus == ID_STATUS_INVISIBLE); + __forceinline bool isOnline() const + { return m_hServerConn != 0; } class CWhatsAppQRDlg *m_pQRDlg; diff --git a/protocols/WhatsAppWeb/src/server.cpp b/protocols/WhatsAppWeb/src/server.cpp index 6ee13e2653..316d9499fb 100644 --- a/protocols/WhatsAppWeb/src/server.cpp +++ b/protocols/WhatsAppWeb/src/server.cpp @@ -42,7 +42,6 @@ int WhatsAppProto::WSSend(const CMStringA &str, WA_PKT_HANDLER pHandler) void WhatsAppProto::OnLoggedIn() { debugLogA("CDiscordProto::OnLoggedIn"); - m_bOnline = true; ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)m_iStatus, m_iDesiredStatus); m_iStatus = m_iDesiredStatus; @@ -54,7 +53,6 @@ void WhatsAppProto::OnLoggedIn() void WhatsAppProto::OnLoggedOut(void) { debugLogA("CDiscordProto::OnLoggedOut"); - m_bOnline = false; m_bTerminated = true; m_iPktNumber = 0; |