if (a1->port != a2->port)
return 0;
-#ifdef USE_IMAP
if (a1->type == M_ACCT_TYPE_IMAP) {
if (ImapUser && (ImapUser[0] != '\0'))
user = ImapUser;
if (ImapLogin && (ImapLogin[0] != '\0'))
login = ImapLogin;
}
-#endif
-#ifdef USE_POP
if (a1->type == M_ACCT_TYPE_POP && PopUser)
user = PopUser;
-#endif
#ifdef USE_NNTP
if (a1->type == M_ACCT_TYPE_NNTP && NntpUser)
url->pass = NULL;
url->port = 0;
-#ifdef USE_IMAP
if (account->type == M_ACCT_TYPE_IMAP) {
if (account->flags & M_ACCT_SSL)
url->scheme = U_IMAPS;
else
url->scheme = U_IMAP;
}
-#endif
-#ifdef USE_POP
if (account->type == M_ACCT_TYPE_POP) {
if (account->flags & M_ACCT_SSL)
url->scheme = U_POPS;
else
url->scheme = U_POP;
}
-#endif
#ifdef USE_NNTP
if (account->type == M_ACCT_TYPE_NNTP) {
/* already set */
if (account->flags & M_ACCT_USER)
return 0;
-#ifdef USE_IMAP
else if ((account->type == M_ACCT_TYPE_IMAP) && !m_strisempty(ImapUser))
m_strcpy(account->user, sizeof(account->user), ImapUser);
-#endif
-#ifdef USE_POP
else if ((account->type == M_ACCT_TYPE_POP) && !m_strisempty(PopUser))
m_strcpy(account->user, sizeof(account->user), PopUser);
-#endif
#ifdef USE_NNTP
else if ((account->type == M_ACCT_TYPE_NNTP) && !m_strisempty(NntpUser))
m_strcpy(account->user, sizeof(account->user), NntpUser);
/* already set */
if (account->flags & M_ACCT_LOGIN)
return 0;
-#ifdef USE_IMAP
else if (account->type == M_ACCT_TYPE_IMAP)
{
if (!m_strisempty(ImapLogin)) {
account->flags |= M_ACCT_LOGIN;
}
}
-#endif
if (!(account->flags & M_ACCT_LOGIN)) {
mutt_account_getuser (account);
if (account->flags & M_ACCT_PASS)
return 0;
-#ifdef USE_IMAP
else if ((account->type == M_ACCT_TYPE_IMAP) && !m_strisempty(ImapPass))
m_strcpy(account->pass, sizeof(account->pass), ImapPass);
-#endif
-#ifdef USE_POP
else if ((account->type == M_ACCT_TYPE_POP) && !m_strisempty(PopPass))
m_strcpy(account->pass, sizeof(account->pass), PopPass);
-#endif
#ifdef USE_NNTP
else if ((account->type == M_ACCT_TYPE_NNTP) && !m_strisempty(NntpPass))
m_strcpy(account->pass, sizeof(account->pass), NntpPass);