Handle logins using accounts

This commit is contained in:
James Booth
2012-12-09 22:14:38 +00:00
parent 324a85a2a5
commit ce6f227651
7 changed files with 144 additions and 5 deletions

View File

@@ -189,6 +189,22 @@ prof_handle_subscription(const char *from, jabber_subscr_t type)
}
}
void
prof_handle_login_account_success(char *account_name)
{
ProfAccount *account = accounts_get_account(account_name);
const char *msg = "logged in successfully.";
cons_show("%s %s", account->jid, msg);
title_bar_set_status(PRESENCE_ONLINE);
log_info("%s %s", account->jid, msg);
win_current_page_off();
status_bar_print_message(account->jid);
status_bar_refresh();
accounts_free_account(account);
}
void
prof_handle_login_success(const char *jid, const char *altdomain)
{
@@ -199,6 +215,7 @@ prof_handle_login_success(const char *jid, const char *altdomain)
win_current_page_off();
status_bar_print_message(jid);
status_bar_refresh();
accounts_add_login(jid, altdomain);
}