Mercurial > hg
changeset 1894:c3271ac96173
Display the JID before attempting to connect
Display the JID even if a password has been provided, so that it can appear
in the status window.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 11 Apr 2010 19:49:52 +0200 |
parents | dcefd1732a3c |
children | 7043542b3565 |
files | mcabber/mcabber/main.c |
diffstat | 1 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/mcabber/main.c Sun Apr 11 18:53:21 2010 +0200 +++ b/mcabber/mcabber/main.c Sun Apr 11 19:49:52 2010 +0200 @@ -379,19 +379,19 @@ if (ret == -2) exit(EXIT_FAILURE); + /* Display configuration settings */ + { + const char *p; + if ((p = settings_opt_get("server")) != NULL) + scr_log_print(LPRINT_NORMAL, "Server: %s", p); + if ((p = settings_opt_get("jid")) != NULL) + scr_log_print(LPRINT_NORMAL, "User JID: %s", p); + } + /* If no password is stored, we ask for it before entering ncurses mode -- unless the username is unknown. */ if (settings_opt_get("jid") && !settings_opt_get("password")) { - const char *p; - char *pwd; - p = settings_opt_get("server"); - if (p) - printf("Server: %s\n", p); - p = settings_opt_get("jid"); - if (p) - printf("User JID: %s\n", p); - - pwd = ask_password("your Jabber password"); + char *pwd = ask_password("your Jabber password"); settings_set(SETTINGS_TYPE_OPTION, "password", pwd); g_free(pwd); }