diff -r 4adde60ed7da -r 0115e8068f51 src/account.c --- a/src/account.c Mon Jun 02 10:10:37 2003 +0000 +++ b/src/account.c Mon Jun 02 10:21:33 2003 +0000 @@ -33,6 +33,7 @@ #include "account.h" #include "prefs.h" +#include "prpl.h" typedef enum { @@ -248,10 +249,21 @@ void gaim_account_set_protocol(GaimAccount *account, GaimProtocol protocol) { + GaimPlugin *plugin; + g_return_if_fail(account != NULL); + plugin = gaim_find_prpl(protocol); + + g_return_if_fail(plugin != NULL); + account->protocol = protocol; + if (account->protocol_id != NULL) + g_free(account->protocol_id); + + account->protocol_id = g_strdup(plugin->info->id); + schedule_accounts_save(); }