diff 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
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Wed Jan 28 04:09:18 2004 +0000
+++ b/src/protocols/oscar/oscar.c	Wed Jan 28 05:43:04 2004 +0000
@@ -4918,6 +4918,7 @@
 				}
 			}
 		}
+
 		while (cur != NULL) {
 			b = cur->data;
 			cur = g_slist_remove(cur, b);
@@ -6061,13 +6062,13 @@
 	int at;
 
 	switch(account->perm_deny) {
-	case 1: 
+	case GAIM_PRIVACY_ALLOW_ALL: 
 		aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYADD, gaim_account_get_username(account));
 		break;
-	case 2:
+	case GAIM_PRIVACY_DENY_ALL:
 		aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, gaim_account_get_username(account));
 		break;
-	case 3:
+	case GAIM_PRIVACY_ALLOW_USERS:
 		list = account->permit;
 		at = 0;
 		while (list) {
@@ -6076,7 +6077,7 @@
 		}
 		aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, buf);
 		break;
-	case 4:
+	case GAIM_PRIVACY_DENY_USERS:
 		list = account->deny;
 		at = 0;
 		while (list) {
@@ -6089,8 +6090,28 @@
 		break;
 	}
 #else
-	if (od->sess->ssi.received_data)
-		aim_ssi_setpermdeny(od->sess, account->perm_deny, 0xffffffff);
+	if (od->sess->ssi.received_data) {
+		switch (account->perm_deny) {
+			case GAIM_PRIVACY_ALLOW_ALL:
+				aim_ssi_setpermdeny(od->sess, 0x01, 0xffffffff);
+				break;
+			case GAIM_PRIVACY_ALLOW_BUDDYLIST:
+				aim_ssi_setpermdeny(od->sess, 0x05, 0xffffffff);
+				break;
+			case GAIM_PRIVACY_ALLOW_USERS:
+				aim_ssi_setpermdeny(od->sess, 0x03, 0xffffffff);
+				break;
+			case GAIM_PRIVACY_DENY_ALL:
+				aim_ssi_setpermdeny(od->sess, 0x02, 0xffffffff);
+				break;
+			case GAIM_PRIVACY_DENY_USERS:
+				aim_ssi_setpermdeny(od->sess, 0x04, 0xffffffff);
+				break;
+			default:
+				aim_ssi_setpermdeny(od->sess, 0x01, 0xffffffff);
+				break;
+		}
+	}
 #endif
 }