summaryrefslogtreecommitdiff
path: root/protocols/MSN/src
diff options
context:
space:
mode:
authorPiotr Piastucki <leech.miranda@gmail.com>2015-05-16 22:03:37 +0000
committerPiotr Piastucki <leech.miranda@gmail.com>2015-05-16 22:03:37 +0000
commitb5c08ff62968cf49c19dcdd2347520e400cbb5f5 (patch)
tree868a4dc3007fe1a1f608a0f6f22dad8ee43890f8 /protocols/MSN/src
parent28a5e958778bae84618a6eb57e4864d37c07cd0c (diff)
- Fixed port number in options dlg (which still showed old port number)
- Changed checkboxes to enable setting instead of disable it by checking them which seems a bit inconsistent. - Also cache MSN Passport token as it is needed for editing MSN profile in web - Do not set user status to offline when another endpoint of our user (i.e. web) disconnects. - Set wlid in options dialog when saving username/pass so that other modules can also read current WLID correctly (as we do not rely on e-mail addresses anymore) - Kick out file sending/receiving capability as this doesn't work anymore. git-svn-id: http://svn.miranda-ng.org/main/trunk@13658 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/src')
-rw-r--r--protocols/MSN/src/msn_auth.cpp5
-rw-r--r--protocols/MSN/src/msn_commands.cpp1
-rw-r--r--protocols/MSN/src/msn_opts.cpp19
-rw-r--r--protocols/MSN/src/msn_proto.cpp2
4 files changed, 19 insertions, 8 deletions
diff --git a/protocols/MSN/src/msn_auth.cpp b/protocols/MSN/src/msn_auth.cpp
index 764fad3891..40a3db09b5 100644
--- a/protocols/MSN/src/msn_auth.cpp
+++ b/protocols/MSN/src/msn_auth.cpp
@@ -206,6 +206,7 @@ int CMsnProto::MSN_GetPassportAuth(void)
node = ezxml_get(tokr, "wst:RequestedProofToken", 0, "wst:BinarySecret", -1);
replaceStr(hotSecretToken, ezxml_txt(node));
+ setString("hotSecretToken", hotSecretToken);
}
else if (strcmp(addr, "chatservice.live.com") == 0) {
ezxml_t node = ezxml_get(tokr, "wst:RequestedProofToken", 0,
@@ -676,6 +677,10 @@ void CMsnProto::LoadAuthTokensDB(void)
replaceStr(authStrToken, dbv.pszVal);
db_free(&dbv);
}
+ if (getString("hotSecretToken", &dbv) == 0) {
+ replaceStr(hotSecretToken, dbv.pszVal);
+ db_free(&dbv);
+ }
}
void CMsnProto::SaveAuthTokensDB(void)
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp
index 568aa898c1..ddfac66fb9 100644
--- a/protocols/MSN/src/msn_commands.cpp
+++ b/protocols/MSN/src/msn_commands.cpp
@@ -748,6 +748,7 @@ void CMsnProto::MSN_ProcessNLN(const char *userStatus, const char *wlid, char *u
char* szEmail, *szNet;
parseWLID(NEWSTR_ALLOCA(wlid), &szNet, &szEmail, NULL);
if (!stricmp(szEmail, GetMyUsername(atoi(szNet)))) {
+ if (!*userStatus) return;
isMe = true;
int newStatus = MSNStatusToMiranda(userStatus);
if (newStatus != m_iStatus && newStatus != ID_STATUS_IDLE) {
diff --git a/protocols/MSN/src/msn_opts.cpp b/protocols/MSN/src/msn_opts.cpp
index 6d9f338973..47d9b38b1c 100644
--- a/protocols/MSN/src/msn_opts.cpp
+++ b/protocols/MSN/src/msn_opts.cpp
@@ -230,6 +230,8 @@ LBL_Continue:
reconnectRequired = true;
strcpy(proto->MyOptions.szEmail, szEmail);
proto->setString("e-mail", szEmail);
+ proto->setString("wlid", szEmail);
+ proto->setDword("netId", proto->GetMyNetID());
}
GetDlgItemTextA(hwndDlg, IDC_PASSWORD, password, SIZEOF(password));
@@ -441,9 +443,9 @@ static INT_PTR CALLBACK DlgProcHotmailPopupOpts(HWND hwndDlg, UINT msg, WPARAM w
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
proto = (CMsnProto*)lParam;
- CheckDlgButton(hwndDlg, IDC_DISABLEHOTMAILPOPUP, proto->getByte("DisableHotmail", 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_DISABLEHOTMAILTRAY, proto->getByte("DisableHotmailTray", 1) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_DISABLEHOTMAILCL, proto->getByte("DisableHotmailCL", 0) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_DISABLEHOTMAILPOPUP, proto->getByte("DisableHotmail", 0) ? BST_UNCHECKED : BST_CHECKED);
+ CheckDlgButton(hwndDlg, IDC_DISABLEHOTMAILTRAY, proto->getByte("DisableHotmailTray", 1) ? BST_UNCHECKED : BST_CHECKED);
+ CheckDlgButton(hwndDlg, IDC_DISABLEHOTMAILCL, proto->getByte("DisableHotmailCL", 0) ? BST_UNCHECKED : BST_CHECKED);
CheckDlgButton(hwndDlg, IDC_DISABLEHOTJUNK, proto->getByte("DisableHotmailJunk", 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_NOTIFY_ENDSESSION, proto->getByte("EnableSessionPopup", 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_NOTIFY_FIRSTMSG, proto->getByte("EnableDeliveryPopup", 0) ? BST_CHECKED : BST_UNCHECKED);
@@ -479,9 +481,9 @@ static INT_PTR CALLBACK DlgProcHotmailPopupOpts(HWND hwndDlg, UINT msg, WPARAM w
proto->MyOptions.ShowErrorsAsPopups = IsDlgButtonChecked(hwndDlg, IDC_ERRORS_USING_POPUPS) != 0;
proto->setByte("ShowErrorsAsPopups", proto->MyOptions.ShowErrorsAsPopups);
- proto->setByte("DisableHotmail", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_DISABLEHOTMAILPOPUP));
- proto->setByte("DisableHotmailCL", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_DISABLEHOTMAILCL));
- proto->setByte("DisableHotmailTray", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_DISABLEHOTMAILTRAY));
+ proto->setByte("DisableHotmail", IsDlgButtonChecked(hwndDlg, IDC_DISABLEHOTMAILPOPUP) ? FALSE : TRUE);
+ proto->setByte("DisableHotmailCL", IsDlgButtonChecked(hwndDlg, IDC_DISABLEHOTMAILCL) ? FALSE : TRUE);
+ proto->setByte("DisableHotmailTray", IsDlgButtonChecked(hwndDlg, IDC_DISABLEHOTMAILTRAY) ? FALSE : TRUE);
proto->setByte("DisableHotmailJunk", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_DISABLEHOTJUNK));
proto->setByte("EnableDeliveryPopup", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_NOTIFY_FIRSTMSG));
proto->setByte("EnableSessionPopup", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_NOTIFY_ENDSESSION));
@@ -551,6 +553,8 @@ static INT_PTR CALLBACK DlgProcAccMgrUI(HWND hwndDlg, UINT msg, WPARAM wParam, L
if (strcmp(szEmail, proto->MyOptions.szEmail)) {
strcpy(proto->MyOptions.szEmail, szEmail);
proto->setString("e-mail", szEmail);
+ proto->setString("wlid", szEmail);
+ proto->setDword("netId", proto->GetMyNetID());
}
GetDlgItemTextA(hwndDlg, IDC_PASSWORD, password, SIZEOF(password));
@@ -664,7 +668,8 @@ void CMsnProto::LoadOptions(void)
MyOptions.ManageServer = getByte("ManageServer", TRUE) != 0;
MyOptions.ShowErrorsAsPopups = getByte("ShowErrorsAsPopups", TRUE) != 0;
MyOptions.SlowSend = getByte("SlowSend", FALSE) != 0;
- if (db_get_static(NULL, m_szModuleName, "e-mail", MyOptions.szEmail, sizeof(MyOptions.szEmail)))
+ if (db_get_static(NULL, m_szModuleName, "wlid", MyOptions.szEmail, sizeof(MyOptions.szEmail)) &&
+ db_get_static(NULL, m_szModuleName, "e-mail", MyOptions.szEmail, sizeof(MyOptions.szEmail)))
MyOptions.szEmail[0] = 0;
_strlwr(MyOptions.szEmail);
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp
index d13086edd7..b4e35c6f2c 100644
--- a/protocols/MSN/src/msn_proto.cpp
+++ b/protocols/MSN/src/msn_proto.cpp
@@ -640,7 +640,7 @@ DWORD_PTR __cdecl CMsnProto::GetCaps(int type, MCONTACT)
case PFLAGNUM_1:
return PF1_IM | PF1_SERVERCLIST | PF1_AUTHREQ | PF1_BASICSEARCH |
PF1_ADDSEARCHRES | PF1_CHAT |
- PF1_FILESEND | PF1_FILERECV | PF1_URLRECV | PF1_VISLIST | PF1_MODEMSG;
+ /*PF1_FILESEND | PF1_FILERECV | */PF1_URLRECV | PF1_VISLIST | PF1_MODEMSG;
case PFLAGNUM_2:
return PF2_ONLINE | PF2_SHORTAWAY | PF2_LIGHTDND | PF2_INVISIBLE | PF2_ONTHEPHONE | PF2_IDLE;