diff options
author | Robert Pösel <robyer@seznam.cz> | 2015-03-06 16:46:10 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2015-03-06 16:46:10 +0000 |
commit | 615a53f6195f25a3d1b517f10f8957d0f0583768 (patch) | |
tree | 4304cd2cf21ad431bc2029170ce50f7e41a1f038 /protocols/Steam/src/steam_proto.cpp | |
parent | 4d7709c7b8fc466d21158670bb94aaea23ecb2e5 (diff) |
Steam: Add support for setting Away and N/A (= snooze) statuses
This is pseudo support as on server it is determined by our idle time which is sent with poll request. That means we must wait up to 30 seconds to status being changed on server.
Also this change disables reporting real idle time.
git-svn-id: http://svn.miranda-ng.org/main/trunk@12352 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam/src/steam_proto.cpp')
-rw-r--r-- | protocols/Steam/src/steam_proto.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp index e7efc9f510..8a80a2e235 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -240,7 +240,7 @@ DWORD_PTR __cdecl CSteamProto:: GetCaps(int type, MCONTACT hContact) case PFLAGNUM_4: return PF4_AVATARS | PF4_NOCUSTOMAUTH | PF4_NOAUTHDENYREASON | PF4_FORCEAUTH | PF4_FORCEADDED | PF4_IMSENDUTF | PF4_SUPPORTIDLE | PF4_SUPPORTTYPING;// | PF4_IMSENDOFFLINE; case PFLAGNUM_5: - return PF2_SHORTAWAY | PF2_LONGAWAY | PF2_HEAVYDND | PF2_OUTTOLUNCH | PF2_FREECHAT; + return PF2_HEAVYDND | PF2_OUTTOLUNCH | PF2_FREECHAT; case PFLAG_UNIQUEIDTEXT: return (DWORD_PTR)Translate("SteamID"); case PFLAG_UNIQUEIDSETTING: @@ -381,6 +381,15 @@ int CSteamProto::SetStatus(int new_status) switch (new_status) { case ID_STATUS_OFFLINE: + case ID_STATUS_AWAY: + case ID_STATUS_NA: + break; + + case ID_STATUS_DND: + case ID_STATUS_OCCUPIED: + case ID_STATUS_ONTHEPHONE: + case ID_STATUS_OUTTOLUNCH: + new_status = ID_STATUS_NA; break; default: @@ -413,6 +422,11 @@ int CSteamProto::SetStatus(int new_status) StartQueue(); } + else + { + m_iStatus = new_status; + ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus); + } return 0; } |