about summary refs log tree commit diff stats
path: root/src/command/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/command/commands.c')
-rw-r--r--src/command/commands.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/command/commands.c b/src/command/commands.c
index 25442b80..9c16ef81 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -29,6 +29,7 @@
 #include "command/commands.h"
 #include "common.h"
 #include "config/accounts.h"
+#include "config/account.h"
 #include "config/preferences.h"
 #include "config/theme.h"
 #include "contact.h"
@@ -149,13 +150,13 @@ cmd_connect(gchar **args, struct cmd_help_t help)
 
         ProfAccount *account = accounts_get_account(lower);
         if (account != NULL) {
-            jid = accounts_create_full_jid(account);
+            jid = account_create_full_jid(account);
             if (account->password == NULL) {
                 account->password = ui_ask_password();
             }
             cons_show("Connecting with account %s as %s", account->name, jid);
             conn_status = jabber_connect_with_account(account);
-            accounts_free_account(account);
+            account_free(account);
         } else {
             char *passwd = ui_ask_password();
             jid = strdup(lower);
@@ -189,7 +190,7 @@ cmd_account(gchar **args, struct cmd_help_t help)
         } else {
             ProfAccount *account = accounts_get_account(jabber_get_account_name());
             cons_show_account(account);
-            accounts_free_account(account);
+            account_free(account);
         }
     } else if (strcmp(command, "list") == 0) {
         gchar **accounts = accounts_get_list();
@@ -206,7 +207,7 @@ cmd_account(gchar **args, struct cmd_help_t help)
                 cons_show("");
             } else {
                 cons_show_account(account);
-                accounts_free_account(account);
+                account_free(account);
             }
         }
     } else if (strcmp(command, "add") == 0) {
@@ -1623,7 +1624,7 @@ cmd_join(gchar **args, struct cmd_help_t help)
     jid_destroy(room_jid);
     jid_destroy(my_jid);
     g_string_free(room_str, TRUE);
-    accounts_free_account(account);
+    account_free(account);
 
     return TRUE;
 }