diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-10-08 08:55:53 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-10-08 08:55:53 +0000 |
commit | 0d11f71e3bb30c9760f7fc8b027897047530b136 (patch) | |
tree | f65324ac5278878e1bad871dd083b1c972590c38 /protocols/SkypeClassic/src/skypeapi.cpp | |
parent | a134f7e823d5d334bfee65652534c206569e0b3e (diff) |
SkypeClassic: Sync from leecher's repo (r1963)
- Fixed a severe bug that prevented the correct auth user to be read preventing every authentication accept.
- Fixed a crash in Groupchat when only 2 users were left and user parted the groupchat
- Added feature for blocking contacts
git-svn-id: http://svn.miranda-ng.org/main/trunk@10744 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeClassic/src/skypeapi.cpp')
-rw-r--r-- | protocols/SkypeClassic/src/skypeapi.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/protocols/SkypeClassic/src/skypeapi.cpp b/protocols/SkypeClassic/src/skypeapi.cpp index b5bd939172..09a5fdb6bc 100644 --- a/protocols/SkypeClassic/src/skypeapi.cpp +++ b/protocols/SkypeClassic/src/skypeapi.cpp @@ -745,7 +745,7 @@ static INT_PTR CALLBACK DialDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR if (!strncmp(number, "00", 2)) {
memmove(number, number+1, sizeof(number)-1);
number[0]='+';
- number[sizeof(number)]=0;
+ number[sizeof(number)-1] = 0;
}
if (!hContact) {
if (!(hContact=add_contact(number, PALF_TEMPORARY))) {
@@ -1183,6 +1183,24 @@ INT_PTR SkypeChatCreate(WPARAM wParam, LPARAM lParam) { return 0;
}
+/* SkypeBlockContact
+*
+* Purpose: Blocks/unblocks contact
+*/
+INT_PTR SkypeBlockContact(WPARAM wParam, LPARAM lParam) {
+ DBVARIANT dbv;
+ MCONTACT hContact = (MCONTACT)wParam;
+ int iRet = 0;
+
+ if (!hContact || db_get_s(hContact, SKYPE_PROTONAME, SKYPE_NAME, &dbv))
+ return -1;
+
+ if (SkypeSend("SET USER %s ISBLOCKED %s", dbv.pszVal, db_get_b(hContact, SKYPE_PROTONAME, "IsBlocked", 0) ? "FALSE" : "TRUE"))
+ iRet = -1;
+ db_free(&dbv);
+ return iRet;
+}
+
/* SkypeAdduserDlg
*
* Purpose: Show Skype's Add user Dialog
|