comparison src/protocols/oscar/oscar.c @ 8175:f347c8d25cf5

[gaim-migrate @ 8889] Make privacy stuff use an enum for different privacy options. This started with a fix to make the box for "allow the users below" show up when opening the privacy dialog when that option was selected. It might be a good idea for a few people to check their privacy settings after using this to make sure it's the same as what it used to be. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 28 Jan 2004 05:43:04 +0000
parents 9d1a984681fe
children 3418a6d51464
comparison
equal deleted inserted replaced
8174:4c34db6996d1 8175:f347c8d25cf5
4916 } 4916 }
4917 } 4917 }
4918 } 4918 }
4919 } 4919 }
4920 } 4920 }
4921
4921 while (cur != NULL) { 4922 while (cur != NULL) {
4922 b = cur->data; 4923 b = cur->data;
4923 cur = g_slist_remove(cur, b); 4924 cur = g_slist_remove(cur, b);
4924 gaim_blist_remove_buddy(b); 4925 gaim_blist_remove_buddy(b);
4925 } 4926 }
6059 GSList *list; 6060 GSList *list;
6060 char buf[MAXMSGLEN]; 6061 char buf[MAXMSGLEN];
6061 int at; 6062 int at;
6062 6063
6063 switch(account->perm_deny) { 6064 switch(account->perm_deny) {
6064 case 1: 6065 case GAIM_PRIVACY_ALLOW_ALL:
6065 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYADD, gaim_account_get_username(account)); 6066 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYADD, gaim_account_get_username(account));
6066 break; 6067 break;
6067 case 2: 6068 case GAIM_PRIVACY_DENY_ALL:
6068 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, gaim_account_get_username(account)); 6069 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, gaim_account_get_username(account));
6069 break; 6070 break;
6070 case 3: 6071 case GAIM_PRIVACY_ALLOW_USERS:
6071 list = account->permit; 6072 list = account->permit;
6072 at = 0; 6073 at = 0;
6073 while (list) { 6074 while (list) {
6074 at += g_snprintf(buf + at, sizeof(buf) - at, "%s&", (char *)list->data); 6075 at += g_snprintf(buf + at, sizeof(buf) - at, "%s&", (char *)list->data);
6075 list = list->next; 6076 list = list->next;
6076 } 6077 }
6077 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, buf); 6078 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, buf);
6078 break; 6079 break;
6079 case 4: 6080 case GAIM_PRIVACY_DENY_USERS:
6080 list = account->deny; 6081 list = account->deny;
6081 at = 0; 6082 at = 0;
6082 while (list) { 6083 while (list) {
6083 at += g_snprintf(buf + at, sizeof(buf) - at, "%s&", (char *)list->data); 6084 at += g_snprintf(buf + at, sizeof(buf) - at, "%s&", (char *)list->data);
6084 list = list->next; 6085 list = list->next;
6087 break; 6088 break;
6088 default: 6089 default:
6089 break; 6090 break;
6090 } 6091 }
6091 #else 6092 #else
6092 if (od->sess->ssi.received_data) 6093 if (od->sess->ssi.received_data) {
6093 aim_ssi_setpermdeny(od->sess, account->perm_deny, 0xffffffff); 6094 switch (account->perm_deny) {
6095 case GAIM_PRIVACY_ALLOW_ALL:
6096 aim_ssi_setpermdeny(od->sess, 0x01, 0xffffffff);
6097 break;
6098 case GAIM_PRIVACY_ALLOW_BUDDYLIST:
6099 aim_ssi_setpermdeny(od->sess, 0x05, 0xffffffff);
6100 break;
6101 case GAIM_PRIVACY_ALLOW_USERS:
6102 aim_ssi_setpermdeny(od->sess, 0x03, 0xffffffff);
6103 break;
6104 case GAIM_PRIVACY_DENY_ALL:
6105 aim_ssi_setpermdeny(od->sess, 0x02, 0xffffffff);
6106 break;
6107 case GAIM_PRIVACY_DENY_USERS:
6108 aim_ssi_setpermdeny(od->sess, 0x04, 0xffffffff);
6109 break;
6110 default:
6111 aim_ssi_setpermdeny(od->sess, 0x01, 0xffffffff);
6112 break;
6113 }
6114 }
6094 #endif 6115 #endif
6095 } 6116 }
6096 6117
6097 static void oscar_add_permit(GaimConnection *gc, const char *who) { 6118 static void oscar_add_permit(GaimConnection *gc, const char *who) {
6098 #ifdef NOSSI 6119 #ifdef NOSSI