Mercurial > pidgin.yaz
changeset 22243:6dbbf194ec14
Clean up a function
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 01 Feb 2008 02:09:11 +0000 |
parents | d5b65bead569 |
children | b4612f57003b |
files | libpurple/protocols/yahoo/yahoo.c |
diffstat | 1 files changed, 12 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo.c Fri Feb 01 02:05:32 2008 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Fri Feb 01 02:09:11 2008 +0000 @@ -3940,31 +3940,27 @@ yahoo_packet_send_and_free(pkt, yd); } -static void yahoo_set_permit_deny(PurpleConnection *gc) { - PurpleAccount *acct; +static void yahoo_set_permit_deny(PurpleConnection *gc) +{ + PurpleAccount *account; GSList *deny; - acct = gc->account; - - switch (acct->perm_deny) { - /* privacy 1 */ + account = purple_connection_get_account(gc); + + switch (account->perm_deny) + { case PURPLE_PRIVACY_ALLOW_ALL: - for (deny = acct->deny;deny;deny = deny->next) + case PURPLE_PRIVACY_ALLOW_USERS: + for (deny = account->deny; deny; deny = deny->next) yahoo_rem_deny(gc, deny->data); break; - /* privacy 3 */ - case PURPLE_PRIVACY_ALLOW_USERS: - for (deny = acct->deny;deny;deny = deny->next) - yahoo_rem_deny(gc, deny->data); - break; - /* privacy 5 */ + case PURPLE_PRIVACY_ALLOW_BUDDYLIST: - /* privacy 4 */ case PURPLE_PRIVACY_DENY_USERS: - for (deny = acct->deny;deny;deny = deny->next) + for (deny = account->deny; deny; deny = deny->next) yahoo_add_deny(gc, deny->data); break; - /* privacy 2 */ + case PURPLE_PRIVACY_DENY_ALL: default: break;