diff options
Diffstat (limited to 'protocols/Steam/src/steam_proto.cpp')
-rw-r--r-- | protocols/Steam/src/steam_proto.cpp | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp index 612d66768f..36592a4082 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -35,6 +35,7 @@ CSteamProto::CSteamProto(const char* protoName, const TCHAR* userName) : Skin_AddIcon(&sid); // temporary DB settings + db_set_resident(m_szModuleName, "Status"); // NOTE: XStatus cannot be temporary db_set_resident(m_szModuleName, "IdleTS"); SetAllContactsStatus(ID_STATUS_OFFLINE); @@ -199,11 +200,11 @@ DWORD_PTR __cdecl CSteamProto:: GetCaps(int type, MCONTACT hContact) case PFLAGNUM_1: return PF1_IM | PF1_BASICSEARCH | PF1_SEARCHBYNAME | PF1_AUTHREQ | PF1_SERVERCLIST | PF1_ADDSEARCHRES; case PFLAGNUM_2: - return PF2_ONLINE | PF2_SHORTAWAY | PF2_HEAVYDND | PF2_OUTTOLUNCH; + return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_HEAVYDND | PF2_OUTTOLUNCH | PF2_FREECHAT; case PFLAGNUM_4: return PF4_AVATARS | PF4_NOCUSTOMAUTH | PF4_NOAUTHDENYREASON | PF4_FORCEAUTH | PF4_FORCEADDED | PF4_IMSENDUTF | PF4_SUPPORTIDLE;// | PF4_IMSENDOFFLINE | PF4_SUPPORTTYPING; case PFLAGNUM_5: - return PF2_SHORTAWAY | PF2_HEAVYDND | PF2_OUTTOLUNCH; + return 0; case PFLAG_UNIQUEIDTEXT: return (DWORD_PTR)Translate("SteamID"); case PFLAG_UNIQUEIDSETTING: @@ -325,10 +326,15 @@ int CSteamProto::SetStatus(int new_status) // Routing statuses not supported by Steam switch (new_status) { - case ID_STATUS_OFFLINE: + case ID_STATUS_OCCUPIED: + new_status = ID_STATUS_DND; break; - default: + case ID_STATUS_ONTHEPHONE: + new_status = ID_STATUS_AWAY; + break; + + case ID_STATUS_INVISIBLE: new_status = ID_STATUS_ONLINE; break; } @@ -362,6 +368,16 @@ int CSteamProto::SetStatus(int new_status) //ForkThread(&CSteamProto::LogInThread, NULL); StartQueue(); } + else { + ptrA token(getStringA("TokenSecret")); + ptrA sessionId(getStringA("SessionID")); + int state = MirandaToSteamState(new_status); + + PushRequest( + new SteamWebApi::SetStatusRequest(token, sessionId, state), + &CSteamProto::OnStatusChanged, + (void *)new_status); + } return 0; } |