summaryrefslogtreecommitdiff
path: root/protocols/Icq10
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-12-28 20:28:13 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-12-28 20:28:13 +0300
commit0c508d74bee722c4d0032b33377a1305b484027a (patch)
tree224be76126cb0e208843f818deb5a6c6cdba1761 /protocols/Icq10
parent34ff0a2b21a357f80e798940df9ce887dcf1e185 (diff)
obsolte perversion with PF4_INFOSETTINGSVC removed
Diffstat (limited to 'protocols/Icq10')
-rw-r--r--protocols/Icq10/src/proto.cpp2
-rw-r--r--protocols/Icq10/src/server.cpp18
2 files changed, 19 insertions, 1 deletions
diff --git a/protocols/Icq10/src/proto.cpp b/protocols/Icq10/src/proto.cpp
index 3e41f4e63c..f539f3ef40 100644
--- a/protocols/Icq10/src/proto.cpp
+++ b/protocols/Icq10/src/proto.cpp
@@ -208,7 +208,7 @@ INT_PTR CIcqProto::GetCaps(int type, MCONTACT hContact)
return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_FREECHAT | PF2_INVISIBLE;
case PFLAGNUM_4:
- nReturn = PF4_FORCEAUTH | PF4_SUPPORTIDLE | PF4_IMSENDOFFLINE | PF4_INFOSETTINGSVC | PF4_SUPPORTTYPING | PF4_AVATARS | PF4_SERVERMSGID;
+ nReturn = PF4_FORCEAUTH | PF4_SUPPORTIDLE | PF4_IMSENDOFFLINE | PF4_SUPPORTTYPING | PF4_AVATARS | PF4_SERVERMSGID;
break;
case PFLAGNUM_5:
diff --git a/protocols/Icq10/src/server.cpp b/protocols/Icq10/src/server.cpp
index d2d84e39b9..e7c49a7e04 100644
--- a/protocols/Icq10/src/server.cpp
+++ b/protocols/Icq10/src/server.cpp
@@ -173,6 +173,24 @@ void CIcqProto::RetrieveUserInfo(MCONTACT hContact)
void CIcqProto::SetServerStatus(int iStatus)
{
+ const char *szStatus = "online";
+ int invisible = 0;
+
+ switch (iStatus) {
+ case ID_STATUS_OFFLINE: szStatus = "offline"; break;
+ case ID_STATUS_NA: szStatus = "occupied"; break;
+ case ID_STATUS_AWAY:
+ case ID_STATUS_DND: szStatus = "away"; break;
+ case ID_STATUS_INVISIBLE:
+ invisible = 1;
+ }
+
+ auto *pReq = new AsyncHttpRequest(CONN_MAIN, REQUEST_GET, ICQ_API_SERVER "/presence/setState");
+ pReq->flags |= NLHRF_NODUMPSEND;
+ pReq << CHAR_PARAM("f", "json") << CHAR_PARAM("aimsid", m_aimsid) << CHAR_PARAM("r", pReq->m_reqId)
+ << CHAR_PARAM("view", szStatus) << INT_PARAM("invisible", invisible);
+ Push(pReq);
+
int iOldStatus = m_iStatus; m_iStatus = iStatus;
ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)iOldStatus, m_iStatus);
}