Mercurial > pidgin.yaz
comparison libpurple/protocols/yahoo/yahoo.c @ 22243:6dbbf194ec14
Clean up a function
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 01 Feb 2008 02:09:11 +0000 |
parents | d5b65bead569 |
children | 31863f2d7c3c |
comparison
equal
deleted
inserted
replaced
22242:d5b65bead569 | 22243:6dbbf194ec14 |
---|---|
3938 pkt = yahoo_packet_new(YAHOO_SERVICE_IGNORECONTACT, YAHOO_STATUS_AVAILABLE, 0); | 3938 pkt = yahoo_packet_new(YAHOO_SERVICE_IGNORECONTACT, YAHOO_STATUS_AVAILABLE, 0); |
3939 yahoo_packet_hash(pkt, "sss", 1, purple_connection_get_display_name(gc), 7, who, 13, "2"); | 3939 yahoo_packet_hash(pkt, "sss", 1, purple_connection_get_display_name(gc), 7, who, 13, "2"); |
3940 yahoo_packet_send_and_free(pkt, yd); | 3940 yahoo_packet_send_and_free(pkt, yd); |
3941 } | 3941 } |
3942 | 3942 |
3943 static void yahoo_set_permit_deny(PurpleConnection *gc) { | 3943 static void yahoo_set_permit_deny(PurpleConnection *gc) |
3944 PurpleAccount *acct; | 3944 { |
3945 PurpleAccount *account; | |
3945 GSList *deny; | 3946 GSList *deny; |
3946 | 3947 |
3947 acct = gc->account; | 3948 account = purple_connection_get_account(gc); |
3948 | 3949 |
3949 switch (acct->perm_deny) { | 3950 switch (account->perm_deny) |
3950 /* privacy 1 */ | 3951 { |
3951 case PURPLE_PRIVACY_ALLOW_ALL: | 3952 case PURPLE_PRIVACY_ALLOW_ALL: |
3952 for (deny = acct->deny;deny;deny = deny->next) | 3953 case PURPLE_PRIVACY_ALLOW_USERS: |
3954 for (deny = account->deny; deny; deny = deny->next) | |
3953 yahoo_rem_deny(gc, deny->data); | 3955 yahoo_rem_deny(gc, deny->data); |
3954 break; | 3956 break; |
3955 /* privacy 3 */ | 3957 |
3956 case PURPLE_PRIVACY_ALLOW_USERS: | |
3957 for (deny = acct->deny;deny;deny = deny->next) | |
3958 yahoo_rem_deny(gc, deny->data); | |
3959 break; | |
3960 /* privacy 5 */ | |
3961 case PURPLE_PRIVACY_ALLOW_BUDDYLIST: | 3958 case PURPLE_PRIVACY_ALLOW_BUDDYLIST: |
3962 /* privacy 4 */ | |
3963 case PURPLE_PRIVACY_DENY_USERS: | 3959 case PURPLE_PRIVACY_DENY_USERS: |
3964 for (deny = acct->deny;deny;deny = deny->next) | 3960 for (deny = account->deny; deny; deny = deny->next) |
3965 yahoo_add_deny(gc, deny->data); | 3961 yahoo_add_deny(gc, deny->data); |
3966 break; | 3962 break; |
3967 /* privacy 2 */ | 3963 |
3968 case PURPLE_PRIVACY_DENY_ALL: | 3964 case PURPLE_PRIVACY_DENY_ALL: |
3969 default: | 3965 default: |
3970 break; | 3966 break; |
3971 } | 3967 } |
3972 } | 3968 } |