summaryrefslogtreecommitdiffstats
path: root/account.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>2000-08-04 08:06:22 +0000
committerThomas Roessler <roessler@does-not-exist.org>2000-08-04 08:06:22 +0000
commit567011285927857189a606cb5e0420b666d3a644 (patch)
treea2800171cf493ac30307eade9f827134e9a2ab42 /account.c
parent403932262d43cd2109cc2405e10a8d680b6a7a86 (diff)
SASL patch from Brendan Cully.
Diffstat (limited to 'account.c')
-rw-r--r--account.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/account.c b/account.c
index f095763e..2853d254 100644
--- a/account.c
+++ b/account.c
@@ -56,6 +56,8 @@ int mutt_account_match (const ACCOUNT* a1, const ACCOUNT* a2)
/* mutt_account_getuser: retrieve username into ACCOUNT, if neccessary */
int mutt_account_getuser (ACCOUNT* account)
{
+ char prompt[SHORT_STRING];
+
/* already set */
if (account->flags & M_ACCT_USER)
return 0;
@@ -70,9 +72,9 @@ int mutt_account_getuser (ACCOUNT* account)
/* prompt (defaults to unix username), copy into account->user */
else
{
+ snprintf (prompt, sizeof (prompt), _("Username at %s: "), account->host);
strfcpy (account->user, NONULL (Username), sizeof (account->user));
- if (mutt_get_field (_("Username: "), account->user,
- sizeof (account->user), 0))
+ if (mutt_get_field (prompt, account->user, sizeof (account->user), 0))
return -1;
}
@@ -84,6 +86,8 @@ int mutt_account_getuser (ACCOUNT* account)
/* mutt_account_getpass: fetch password into ACCOUNT, if neccessary */
int mutt_account_getpass (ACCOUNT* account)
{
+ char prompt[SHORT_STRING];
+
if (account->flags & M_ACCT_PASS)
return 0;
#ifdef USE_IMAP
@@ -96,9 +100,10 @@ int mutt_account_getpass (ACCOUNT* account)
#endif
else
{
+ snprintf (prompt, sizeof (prompt), _("Password for %s@%s: "),
+ account->user, account->host);
account->pass[0] = '\0';
- if (mutt_get_field (_("Password: "), account->pass,
- sizeof (account->pass), M_PASS))
+ if (mutt_get_field (prompt, account->pass, sizeof (account->pass), M_PASS))
return -1;
}