diff options
author | Will Song <incertia9474@gmail.com> | 2014-12-21 20:09:55 -0600 |
---|---|---|
committer | Will Song <incertia9474@gmail.com> | 2014-12-21 20:09:55 -0600 |
commit | eb2986d531c624eef2819dc8a611c4b5330ae723 (patch) | |
tree | 3143aad731ab5608b5adc6962deaa80aad937123 /src/command | |
parent | 6a3285795a52ae0d177d079e9ee23bb092ef76d7 (diff) | |
download | profani-tty-eb2986d531c624eef2819dc8a611c4b5330ae723.tar.gz |
added warning about options not being used
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/commands.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/command/commands.c b/src/command/commands.c index c294a16b..2abb2d51 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -113,8 +113,6 @@ cmd_connect(gchar **args, struct cmd_help_t help) } } - options_destroy(options); - char *user = args[0]; if(!user){ if(def){ @@ -135,6 +133,8 @@ cmd_connect(gchar **args, struct cmd_help_t help) account->password = ui_ask_password(); } cons_show("Connecting with account %s as %s", account->name, jid); + if(g_hash_table_contains(options, "port") || g_hash_table_contains(options, "server")) + cons_show("Ignoring extra connect options. Please set them with /account set"); conn_status = jabber_connect_with_account(account); account_free(account); } else { @@ -151,6 +151,8 @@ cmd_connect(gchar **args, struct cmd_help_t help) log_info("Connection attempt for %s failed", jid); } + options_destroy(options); + free(jid); result = TRUE; |