summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_events.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2013-06-09 22:21:47 +0000
committerAlexander Lantsev <aunsane@gmail.com>2013-06-09 22:21:47 +0000
commit5cad65e7fb3f8ffaad2355d0b85d980cc5ef07c3 (patch)
tree5ed63205ca0a718f456df8cdda9c09c4e9a8eef8 /protocols/Skype/src/skype_events.cpp
parent2c6ee1a27c2dab1d3db454bbc2c5e43de2ec9231 (diff)
Skype:
- fixed logout from chat on miranda closing (#362) - added new chat command (moderation and etc.) - some improvements git-svn-id: http://svn.miranda-ng.org/main/trunk@4905 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_events.cpp')
-rw-r--r--protocols/Skype/src/skype_events.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/protocols/Skype/src/skype_events.cpp b/protocols/Skype/src/skype_events.cpp
index 86e275f691..e889326d8d 100644
--- a/protocols/Skype/src/skype_events.cpp
+++ b/protocols/Skype/src/skype_events.cpp
@@ -60,13 +60,16 @@ int CSkypeProto::OnContactDeleted(WPARAM wParam, LPARAM lParam)
{
if (this->IsChatRoom(hContact))
{
- ptrW chatID(::db_get_wsa(hContact, this->m_szModuleName, "ChatRoomID"));
+ ptrW chatID(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_LOGIN));
this->LeaveChat(chatID);
- CConversation::Ref conversation;
+ ConversationRef conversation;
this->GetConversationByIdentity(::mir_utf8encodeW(chatID), conversation);
- conversation->RetireFrom();
- conversation->Delete();
+ if (conversation)
+ {
+ conversation->RetireFrom();
+ conversation->Delete();
+ }
}
else
this->RevokeAuth(wParam, lParam);
@@ -178,7 +181,7 @@ int __cdecl CSkypeProto::OnTabSRMMButtonPressed(WPARAM wParam, LPARAM lParam)
case BBB_ID_CONF_INVITE:
if (this->IsOnline() && this->IsChatRoom(hContact))
{
- StringList targets = this->GetChatUsers(mir_ptr<wchar_t>(::db_get_wsa(hContact, this->m_szModuleName, "ChatRoomID")));
+ StringList targets = this->GetChatUsers(ptrW(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_LOGIN)));
this->StartChat(targets);
}
@@ -188,7 +191,7 @@ int __cdecl CSkypeProto::OnTabSRMMButtonPressed(WPARAM wParam, LPARAM lParam)
if (this->IsOnline() && !this->IsChatRoom(hContact))
{
StringList targets;
- targets.insert( mir_ptr<wchar_t>(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_LOGIN)));
+ targets.insert(ptrW(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_LOGIN)));
this->StartChat(targets);
}