diff options
author | Piotr Piastucki <leech.miranda@gmail.com> | 2015-05-16 22:03:37 +0000 |
---|---|---|
committer | Piotr Piastucki <leech.miranda@gmail.com> | 2015-05-16 22:03:37 +0000 |
commit | b5c08ff62968cf49c19dcdd2347520e400cbb5f5 (patch) | |
tree | 868a4dc3007fe1a1f608a0f6f22dad8ee43890f8 /protocols/MSN | |
parent | 28a5e958778bae84618a6eb57e4864d37c07cd0c (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')
-rw-r--r-- | protocols/MSN/res/msn.rc | 12 | ||||
-rw-r--r-- | protocols/MSN/src/msn_auth.cpp | 5 | ||||
-rw-r--r-- | protocols/MSN/src/msn_commands.cpp | 1 | ||||
-rw-r--r-- | protocols/MSN/src/msn_opts.cpp | 19 | ||||
-rw-r--r-- | protocols/MSN/src/msn_proto.cpp | 2 |
5 files changed, 25 insertions, 14 deletions
diff --git a/protocols/MSN/res/msn.rc b/protocols/MSN/res/msn.rc index 12fdb7bf5b..57430555d5 100644 --- a/protocols/MSN/res/msn.rc +++ b/protocols/MSN/res/msn.rc @@ -60,10 +60,10 @@ BEGIN GROUPBOX "Connection settings",IDC_STATIC,4,3,298,64
RTEXT "Direct:",IDC_STATIC,10,18,52,8
EDITTEXT IDC_DIRECTSERVER,68,16,135,12,ES_AUTOHSCROLL
- LTEXT " 1863",IDC_STATIC,209,16,28,12,SS_SUNKEN
+ LTEXT " 443",IDC_STATIC,209,16,28,12,SS_SUNKEN
RTEXT "Gateway:",IDC_STATIC,10,32,52,8
EDITTEXT IDC_GATEWAYSERVER,68,30,135,12,ES_AUTOHSCROLL
- CONTROL " 80",IDC_STATIC,"Static",SS_SIMPLE | SS_SUNKEN | WS_GROUP,209,30,28,12
+ CONTROL " 443",IDC_STATIC,"Static",SS_SIMPLE | SS_SUNKEN | WS_GROUP,209,30,28,12
PUSHBUTTON "Reset",IDC_RESETSERVER,244,16,48,12
CONTROL "Notify me when a message delivery has failed",IDC_SLOWSEND,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,49,285,8
@@ -99,9 +99,11 @@ EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
GROUPBOX "Hotmail",IDC_STATIC,5,7,262,60
- CONTROL "Disable Popup notifications",IDC_DISABLEHOTMAILPOPUP,
+ CONTROL "Enable Popup notifications",IDC_DISABLEHOTMAILPOPUP,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,18,245,10
- CONTROL "Disable Tray notifications",IDC_DISABLEHOTMAILTRAY,
+ CONTROL "Enable Contact List notifications",IDC_DISABLEHOTMAILCL,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,30,245,10
+ CONTROL "Enable Tray notifications",IDC_DISABLEHOTMAILTRAY,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,41,245,10
CONTROL "Ignore new messages not in Inbox folder",IDC_DISABLEHOTJUNK,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,52,245,10
@@ -112,8 +114,6 @@ BEGIN "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,92,245,10
CONTROL "Enable 'Contact left channel' popup",IDC_NOTIFY_ENDSESSION,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,105,245,8
- CONTROL "Disable Contact List notifications",IDC_DISABLEHOTMAILCL,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,30,245,10
END
IDD_SETNICKNAME DIALOGEX 0, 0, 187, 42
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;
|