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/skype.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/skype.cpp')
-rw-r--r-- | protocols/SkypeClassic/src/skype.cpp | 69 |
1 files changed, 36 insertions, 33 deletions
diff --git a/protocols/SkypeClassic/src/skype.cpp b/protocols/SkypeClassic/src/skype.cpp index 8f5b22805d..eee5dffa4a 100644 --- a/protocols/SkypeClassic/src/skype.cpp +++ b/protocols/SkypeClassic/src/skype.cpp @@ -1993,39 +1993,42 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) LOG(("WndProc: Deleting the TimeZone in UserInfo Section"));
db_unset(hContact, "UserInfo", "Timezone");
}
- }
- else
- if (!strcmp(ptr, "IS_VIDEO_CAPABLE")){
- if (!_stricmp(ptr + 17, "True"))
- db_set_s(hContact, SKYPE_PROTONAME, "MirVer", "Skype 2.0");
- else
- db_set_s(hContact, SKYPE_PROTONAME, "MirVer", "Skype");
- }
+ } else
+ if (!strcmp(ptr, "IS_VIDEO_CAPABLE")){
+ if (!_stricmp(ptr + 17, "True"))
+ db_set_s(hContact, SKYPE_PROTONAME, "MirVer", "Skype 2.0");
else
- if (!strcmp(ptr, "RICH_MOOD_TEXT")) {
- db_set_s(hContact, SKYPE_PROTONAME, "MirVer", "Skype 3.0");
+ db_set_s(hContact, SKYPE_PROTONAME, "MirVer", "Skype");
+ } else
+ if (!strcmp(ptr, "ISBLOCKED")){
+ if (!_stricmp(ptr + 10, "True"))
+ db_set_b(hContact, SKYPE_PROTONAME, "IsBlocked", 1);
+ else
+ db_unset(hContact, SKYPE_PROTONAME, "IsBlocked");
+ } else
+ if (!strcmp(ptr, "RICH_MOOD_TEXT")) {
+ db_set_s(hContact, SKYPE_PROTONAME, "MirVer", "Skype 3.0");
+ } else
+ if (!strcmp(ptr, "DISPLAYNAME")) {
+ // Skype Bug? -> If nickname isn't customised in the Skype-App, this won't return anything :-(
+ if (ptr[12])
+ db_set_utf(hContact, SKYPE_PROTONAME, "Nick", ptr + 12);
+ }
+ else // Other proerties that can be directly assigned to a DB-Value
+ {
+ int i;
+ char *pszProp;
+
+ for (i = 0; i < sizeof(m_settings) / sizeof(m_settings[0]); i++) {
+ if (!strcmp(ptr, m_settings[i].SkypeSetting)) {
+ pszProp = ptr + strlen(m_settings[i].SkypeSetting) + 1;
+ if (*pszProp)
+ db_set_utf(hContact, SKYPE_PROTONAME, m_settings[i].MirandaSetting, pszProp);
+ else
+ db_unset(hContact, SKYPE_PROTONAME, m_settings[i].MirandaSetting);
}
- else
- if (!strcmp(ptr, "DISPLAYNAME")) {
- // Skype Bug? -> If nickname isn't customised in the Skype-App, this won't return anything :-(
- if (ptr[12])
- db_set_utf(hContact, SKYPE_PROTONAME, "Nick", ptr + 12);
- }
- else // Other proerties that can be directly assigned to a DB-Value
- {
- int i;
- char *pszProp;
-
- for (i = 0; i < sizeof(m_settings) / sizeof(m_settings[0]); i++) {
- if (!strcmp(ptr, m_settings[i].SkypeSetting)) {
- pszProp = ptr + strlen(m_settings[i].SkypeSetting) + 1;
- if (*pszProp)
- db_set_utf(hContact, SKYPE_PROTONAME, m_settings[i].MirandaSetting, pszProp);
- else
- db_unset(hContact, SKYPE_PROTONAME, m_settings[i].MirandaSetting);
- }
- }
- }
+ }
+ }
}
else { // BUDDYSTATUS:
flag = 0;
@@ -2835,7 +2838,7 @@ char *__skypeauth(WPARAM wParam) { if (!SkypeInitialized) return NULL;
dbei.cbSize = sizeof(dbei);
- if ((dbei.cbBlob = db_event_getBlobSize((HANDLE)wParam) == -1 ||
+ if (((dbei.cbBlob = db_event_getBlobSize((HANDLE)wParam)) == -1 ||
!(dbei.pBlob = (unsigned char*)malloc(dbei.cbBlob))))
{
return NULL;
@@ -3286,7 +3289,7 @@ extern "C" int __declspec(dllexport) Unload(void) LOG(("Unload started"));
- if (Shutdown && ((skype_path && skype_path[0]) || UseCustomCommand)) {
+ if (Shutdown && (skype_path[0] || UseCustomCommand)) {
if (UseCustomCommand)
{
|