comparison 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
comparison
equal deleted inserted replaced
10011:32467b63f55a 10012:a38881ec9c0f
124 124
125 GaimAccount * 125 GaimAccount *
126 gaim_account_new(const char *username, const char *protocol_id) 126 gaim_account_new(const char *username, const char *protocol_id)
127 { 127 {
128 GaimAccount *account = NULL; 128 GaimAccount *account = NULL;
129 GaimPlugin *prpl = NULL;
130 GaimPluginProtocolInfo *prpl_info = NULL;
129 131
130 g_return_val_if_fail(username != NULL, NULL); 132 g_return_val_if_fail(username != NULL, NULL);
131 g_return_val_if_fail(protocol_id != NULL, NULL); 133 g_return_val_if_fail(protocol_id != NULL, NULL);
132 134
133 account = gaim_accounts_find(username, protocol_id); 135 account = gaim_accounts_find(username, protocol_id);
146 account->ui_settings = g_hash_table_new_full(g_str_hash, g_str_equal, 148 account->ui_settings = g_hash_table_new_full(g_str_hash, g_str_equal,
147 g_free, (GDestroyNotify)g_hash_table_destroy); 149 g_free, (GDestroyNotify)g_hash_table_destroy);
148 account->system_log = NULL; 150 account->system_log = NULL;
149 151
150 account->presence = gaim_presence_new_for_account(account); 152 account->presence = gaim_presence_new_for_account(account);
153
154 prpl = gaim_find_prpl(gaim_account_get_protocol_id(account));
155
156 if (prpl == NULL)
157 return account;
158
159 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl);
160 if ( prpl_info != NULL && prpl_info->status_types != NULL )
161 gaim_account_set_status_types(account, prpl_info->status_types(account));
151 162
152 return account; 163 return account;
153 } 164 }
154 165
155 void 166 void