# HG changeset patch # User Christian Hammond # Date 1060081834 0 # Node ID 4d61775a5741cd38b1a401068fddfdb5d2bf8274 # Parent 9dd4bb3cf1df068b39d8bc1113720ee831054ee2 [gaim-migrate @ 6878] Losing privacy information is a bad thing. I don't know if this would have happened or not, but at the very least, we got some nasty assertions at startup. committer: Tailor Script diff -r 9dd4bb3cf1df -r 4d61775a5741 src/privacy.c --- a/src/privacy.c Tue Aug 05 11:08:40 2003 +0000 +++ b/src/privacy.c Tue Aug 05 11:10:34 2003 +0000 @@ -34,7 +34,6 @@ g_return_val_if_fail(account != NULL, FALSE); g_return_val_if_fail(who != NULL, FALSE); - g_return_val_if_fail(gaim_account_is_connected(account), FALSE); name = g_strdup(normalize(who)); @@ -50,7 +49,9 @@ account->permit = g_slist_append(account->permit, g_strdup(who)); - serv_add_permit(gaim_account_get_connection(account), who); + if (gaim_account_is_connected(account)) + serv_add_permit(gaim_account_get_connection(account), who); + gaim_blist_save(); if (privacy_ops != NULL && privacy_ops->permit_added != NULL) @@ -67,7 +68,6 @@ g_return_val_if_fail(account != NULL, FALSE); g_return_val_if_fail(who != NULL, FALSE); - g_return_val_if_fail(gaim_account_is_connected(account), FALSE); name = g_strdup(normalize(who)); @@ -84,7 +84,9 @@ account->permit = g_slist_remove(account->permit, l->data); g_free(l->data); - serv_rem_deny(gaim_account_get_connection(account), who); + if (gaim_account_is_connected(account)) + serv_rem_deny(gaim_account_get_connection(account), who); + gaim_blist_save(); if (privacy_ops != NULL && privacy_ops->permit_removed != NULL) @@ -101,7 +103,6 @@ g_return_val_if_fail(account != NULL, FALSE); g_return_val_if_fail(who != NULL, FALSE); - g_return_val_if_fail(gaim_account_is_connected(account), FALSE); name = g_strdup(normalize(who)); @@ -117,7 +118,9 @@ account->deny = g_slist_append(account->deny, g_strdup(who)); - serv_add_deny(gaim_account_get_connection(account), who); + if (gaim_account_is_connected(account)) + serv_add_deny(gaim_account_get_connection(account), who); + gaim_blist_save(); if (privacy_ops != NULL && privacy_ops->deny_added != NULL) @@ -134,7 +137,6 @@ g_return_val_if_fail(account != NULL, FALSE); g_return_val_if_fail(who != NULL, FALSE); - g_return_val_if_fail(gaim_account_is_connected(account), FALSE); name = g_strdup(normalize(who)); @@ -151,7 +153,9 @@ account->deny = g_slist_remove(account->deny, l->data); g_free(l->data); - serv_rem_deny(gaim_account_get_connection(account), who); + if (gaim_account_is_connected(account)) + serv_rem_deny(gaim_account_get_connection(account), who); + gaim_blist_save(); if (privacy_ops != NULL && privacy_ops->deny_removed != NULL)