diff options
author | George Hazan <george.hazan@gmail.com> | 2023-12-29 17:03:21 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-12-29 17:03:21 +0300 |
commit | 9536e0bb47b12ea2ae01ab070dd9f6aa5bb360c2 (patch) | |
tree | a6663fa7d5aa9afcb51fe1b914e457acdcf5fa8f /protocols/Gadu-Gadu/src | |
parent | 28535b12d00c1ccfa98250dd2c7e87402545adba (diff) |
fixes #4085 (Удалить настройки невидимости)
Diffstat (limited to 'protocols/Gadu-Gadu/src')
-rw-r--r-- | protocols/Gadu-Gadu/src/core.cpp | 11 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/gg.h | 1 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/gg_proto.cpp | 13 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/gg_proto.h | 1 |
4 files changed, 5 insertions, 21 deletions
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index b7c506df0b..dd2271de69 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -1350,12 +1350,10 @@ void GaduProto::notifyuser(MCONTACT hContact, int refresh) if (!hContact)
return;
- if (isonline() && (uin = (uin_t)getDword(hContact, GG_KEY_UIN, 0)))
- {
+ if (isonline() && (uin = (uin_t)getDword(hContact, GG_KEY_UIN, 0))) {
// Check if user should be invisible
// Or be blocked ?
- if ((getWord(hContact, GG_KEY_APPARENT, (uint16_t)ID_STATUS_ONLINE) == ID_STATUS_OFFLINE) || !Contact::OnList(hContact))
- {
+ if (!Contact::OnList(hContact)) {
gg_EnterCriticalSection(&sess_mutex, "notifyuser", 77, "sess_mutex", 1);
if (refresh) {
gg_remove_notify_ex(m_sess, uin, GG_USER_NORMAL);
@@ -1365,8 +1363,7 @@ void GaduProto::notifyuser(MCONTACT hContact, int refresh) gg_add_notify_ex(m_sess, uin, GG_USER_OFFLINE);
gg_LeaveCriticalSection(&sess_mutex, "notifyuser", 77, 1, "sess_mutex", 1);
}
- else if (getByte(hContact, GG_KEY_BLOCK, 0))
- {
+ else if (getByte(hContact, GG_KEY_BLOCK, 0)) {
gg_EnterCriticalSection(&sess_mutex, "notifyuser", 78, "sess_mutex", 1);
if (refresh)
gg_remove_notify_ex(m_sess, uin, GG_USER_OFFLINE);
@@ -1409,7 +1406,7 @@ void GaduProto::notifyall() int cc = 0;
for (auto &hContact : AccContacts()) {
if (uins[cc] = getDword(hContact, GG_KEY_UIN, 0)) {
- if ((getWord(hContact, GG_KEY_APPARENT, (uint16_t)ID_STATUS_ONLINE) == ID_STATUS_OFFLINE) || !Contact::OnList(hContact))
+ if (!Contact::OnList(hContact))
types[cc] = GG_USER_OFFLINE;
else if (getByte(hContact, GG_KEY_BLOCK, 0))
types[cc] = GG_USER_BLOCKED;
diff --git a/protocols/Gadu-Gadu/src/gg.h b/protocols/Gadu-Gadu/src/gg.h index 757feeda92..301d3fdb2e 100644 --- a/protocols/Gadu-Gadu/src/gg.h +++ b/protocols/Gadu-Gadu/src/gg.h @@ -230,7 +230,6 @@ struct GGGETAVATARDATA #define GG_KEYDEF_GC_POLICY_DEFAULT 0
#define GG_KEY_BLOCK "Block" // Contact is blocked
-#define GG_KEY_APPARENT "ApparentMode" // Visible list
#define GG_KEY_TIMEDEVIATION "TimeDeviation" // Max time deviation for connections (seconds)
#define GG_KEYDEF_TIMEDEVIATION 300
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index 856ce81228..a083507708 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -155,7 +155,7 @@ INT_PTR GaduProto::GetCaps(int type, MCONTACT) switch (type) {
case PFLAGNUM_1:
return PF1_IM | PF1_BASICSEARCH | PF1_EXTSEARCH | PF1_EXTSEARCHUI | PF1_SEARCHBYNAME |
- PF1_MODEMSG | PF1_NUMERICUSERID | PF1_VISLIST | PF1_FILE;
+ PF1_MODEMSG | PF1_NUMERICUSERID | PF1_FILE;
case PFLAGNUM_2:
return PF2_ONLINE | PF2_SHORTAWAY | PF2_HEAVYDND | PF2_FREECHAT | PF2_INVISIBLE |
PF2_LONGAWAY;
@@ -527,17 +527,6 @@ int GaduProto::SendMsg(MCONTACT hContact, MEVENT, const char *msg) }
//////////////////////////////////////////////////////////
-// visible lists
-//
-int GaduProto::SetApparentMode(MCONTACT hContact, int mode)
-{
- setWord(hContact, GG_KEY_APPARENT, (uint16_t)mode);
- notifyuser(hContact, 1);
-
- return 0;
-}
-
-//////////////////////////////////////////////////////////
// sets protocol status
//
int GaduProto::SetStatus(int iNewStatus)
diff --git a/protocols/Gadu-Gadu/src/gg_proto.h b/protocols/Gadu-Gadu/src/gg_proto.h index 75da3bc4f1..f7387f789c 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.h +++ b/protocols/Gadu-Gadu/src/gg_proto.h @@ -48,7 +48,6 @@ struct GaduProto : public PROTO<GaduProto> HANDLE SendFile(MCONTACT hContact, const wchar_t* szDescription, wchar_t** ppszFiles) override;
int SendMsg(MCONTACT hContact, MEVENT hReplyEvent, const char* msg) override;
- int SetApparentMode(MCONTACT hContact, int mode) override;
int SetStatus(int iNewStatus) override;
HANDLE GetAwayMsg(MCONTACT hContact) override;
|