summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-07-06 12:17:30 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-07-06 12:17:30 +0000
commit6af7ff26a41182bf79986e25b2c3e583ea9bc2b2 (patch)
tree61a1920870da934b9fceb1b01f36d7be01f9c8f2 /protocols
parente679eec47aa65fabf1af5577c46bed205b9733a6 (diff)
fixed away color when entering in chat
added offline color support git-svn-id: http://svn.miranda-ng.org/main/trunk@5245 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Skype/src/skype_chat.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/protocols/Skype/src/skype_chat.cpp b/protocols/Skype/src/skype_chat.cpp
index 6425e56207..d22de3c118 100644
--- a/protocols/Skype/src/skype_chat.cpp
+++ b/protocols/Skype/src/skype_chat.cpp
@@ -487,7 +487,15 @@ void ChatRoom::AddMember(const ChatMember &item, const ChatMember &author, DWORD
else
this->SendEvent(item, GC_EVENT_JOIN, timestamp, GCEF_ADDTOLOG, 0, ::TranslateW(ChatRoom::Roles[item.GetRank()]));
- this->SendEvent(item, GC_EVENT_SETCONTACTSTATUS, timestamp, 0, item.GetStatus());
+ int status = item.GetStatus();
+ if (status == ID_STATUS_AWAY || status == ID_STATUS_DND)
+ this->SendEvent(item, GC_EVENT_SETSTATUSEX, timestamp, 0, GC_SSE_ONLYLISTED | GC_SSE_ONLINE, (const wchar_t*)0, item.GetSid());
+ else if (status == ID_STATUS_OFFLINE)
+ this->SendEvent(item, GC_EVENT_SETSTATUSEX, timestamp, 0, GC_SSE_ONLYLISTED | GC_SSE_OFFLINE, (const wchar_t*)0, item.GetSid());
+ else
+ this->SendEvent(item, GC_EVENT_SETSTATUSEX, timestamp, 0, GC_SSE_ONLYLISTED, (const wchar_t*)0, item.GetSid());
+
+ this->SendEvent(item, GC_EVENT_SETCONTACTSTATUS, timestamp, 0, status);
}
}
else
@@ -532,9 +540,11 @@ void ChatRoom::UpdateMemberStatus(ChatMember *member, int status, DWORD timestam
if (member->GetStatus() != status)
{
if (status == ID_STATUS_AWAY || status == ID_STATUS_DND)
- this->SendEvent(*member, GC_EVENT_SETSTATUSEX, timestamp, 0, 3, (const wchar_t*)0, member->GetSid());
+ this->SendEvent(*member, GC_EVENT_SETSTATUSEX, timestamp, 0, GC_SSE_ONLYLISTED | GC_SSE_ONLINE, (const wchar_t*)0, member->GetSid());
+ else if (status == ID_STATUS_OFFLINE)
+ this->SendEvent(*member, GC_EVENT_SETSTATUSEX, timestamp, 0, GC_SSE_ONLYLISTED | GC_SSE_OFFLINE, (const wchar_t*)0, member->GetSid());
else
- this->SendEvent(*member, GC_EVENT_SETSTATUSEX, timestamp, 0, 1, (const wchar_t*)0, member->GetSid());
+ this->SendEvent(*member, GC_EVENT_SETSTATUSEX, timestamp, 0, GC_SSE_ONLYLISTED, (const wchar_t*)0, member->GetSid());
this->SendEvent(*member, GC_EVENT_SETCONTACTSTATUS, timestamp, 0, status);
member->SetStatus(status);