diff src/account.c @ 10012:a38881ec9c0f

[gaim-migrate @ 10929] i'm fairly certain this is all better committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sat, 11 Sep 2004 05:41:50 +0000
parents c892b6dbc341
children eaec201b2688
line wrap: on
line diff
--- a/src/account.c	Sat Sep 11 03:37:16 2004 +0000
+++ b/src/account.c	Sat Sep 11 05:41:50 2004 +0000
@@ -126,6 +126,8 @@
 gaim_account_new(const char *username, const char *protocol_id)
 {
 	GaimAccount *account = NULL;
+	GaimPlugin *prpl = NULL;
+	GaimPluginProtocolInfo *prpl_info = NULL;
 
 	g_return_val_if_fail(username != NULL, NULL);
 	g_return_val_if_fail(protocol_id != NULL, NULL);
@@ -149,6 +151,15 @@
 
 	account->presence = gaim_presence_new_for_account(account);
 
+	prpl = gaim_find_prpl(gaim_account_get_protocol_id(account));
+	
+	if (prpl == NULL)
+		return account;
+	
+	prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl);
+	if ( prpl_info != NULL && prpl_info->status_types != NULL )
+		gaim_account_set_status_types(account, prpl_info->status_types(account));
+
 	return account;
 }