diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-10-24 18:32:11 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-10-24 18:32:11 +0000 |
commit | 38ce5b30b86aa7ae479713426d7a5a4f6fb0f619 (patch) | |
tree | 6bd71ddc0ead9327eba5a1eccb8acc1373e4c227 /protocols/Skype/src/skype_proto.cpp | |
parent | 5ca299a56b6cc35845d0480e6a3f9862e1f36f10 (diff) |
fixed auth menu creation
git-svn-id: http://svn.miranda-ng.org/main/trunk@2066 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_proto.cpp')
-rw-r--r-- | protocols/Skype/src/skype_proto.cpp | 34 |
1 files changed, 6 insertions, 28 deletions
diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp index 3b6ee25f25..750ea27a12 100644 --- a/protocols/Skype/src/skype_proto.cpp +++ b/protocols/Skype/src/skype_proto.cpp @@ -67,38 +67,28 @@ HANDLE __cdecl CSkypeProto::AddToListByEvent(int flags, int iContact, HANDLE hDb }
int __cdecl CSkypeProto::Authorize(HANDLE hDbEvent)
-{
+{
if (this->IsOnline() && hDbEvent)
{
HANDLE hContact = this->GetContactFromAuthEvent(hDbEvent);
if (hContact == INVALID_HANDLE_VALUE)
return 1;
- CContact::Ref contact;
- SEString sid(::mir_u2a(this->GetSettingString(hContact, "sid")));
- g_skype->GetContact(sid, contact);
- contact->SetBuddyStatus(true/*Contact::AUTHORIZED_BY_ME*/);
-
- return 0;
+ return CSkypeProto::GrantAuth((WPARAM)hContact, NULL);
}
return 1;
}
int __cdecl CSkypeProto::AuthDeny(HANDLE hDbEvent, const TCHAR* szReason)
-{
+{
if (this->IsOnline())
{
HANDLE hContact = this->GetContactFromAuthEvent(hDbEvent);
if (hContact == INVALID_HANDLE_VALUE)
return 1;
- CContact::Ref contact;
- SEString sid(::mir_u2a(this->GetSettingString(hContact, "sid")));
- g_skype->GetContact(sid, contact);
- contact->SetBuddyStatus(false/*CContact::BLOCKED_BY_ME*/);
-
- return 0;
+ return CSkypeProto::RevokeAuth((WPARAM)hContact, NULL);
}
return 1;
@@ -126,20 +116,8 @@ int __cdecl CSkypeProto::AuthRecv(HANDLE hContact, PROTORECVEVENT* pre) }
int __cdecl CSkypeProto::AuthRequest(HANDLE hContact, const TCHAR* szMessage)
-{
- if (this->IsOnline() && hContact)
- {
- CContact::Ref contact;
- SEString sid(::mir_u2a(this->GetSettingString(hContact, "sid")));
- g_skype->GetContact(sid, contact);
-
- contact->SendAuthRequest(::mir_u2a(szMessage));
- this->DeleteSetting(hContact, "Grant");
-
- return 0;
- }
-
- return 1;
+{
+ return CSkypeProto::RequestAuth((WPARAM)hContact, (LPARAM)szMessage);
}
HANDLE __cdecl CSkypeProto::ChangeInfo( int iInfoType, void* pInfoData ) { return 0; }
|