changeset 1635:67060e06b234

[gaim-migrate @ 1645] i think oscar blocking works? committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 23 Mar 2001 12:15:02 +0000
parents d029dc28a61e
children b16aa4569521
files ChangeLog STATUS TODO src/oscar.c
diffstat 4 files changed, 31 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Mar 23 11:37:41 2001 +0000
+++ b/ChangeLog	Fri Mar 23 12:15:02 2001 +0000
@@ -7,6 +7,7 @@
 	* Jabber fixes, Oscar fixes (!), Yahoo fixes, TOC fixes
 	* Can use Alt to access menu, and Ctl-char for certain actions
 	  (thanks baldnik)
+	* Oscar blocking works (?)
 
 version 0.11.0-pre7 (03/16/2001):
 	* Can build RPMs as non-root
--- a/STATUS	Fri Mar 23 11:37:41 2001 +0000
+++ b/STATUS	Fri Mar 23 12:15:02 2001 +0000
@@ -1,4 +1,4 @@
-STATUS of GAIM CVS tree. Last modified $Date: 2001-03-23 06:37:41 -0500 (Fri, 23 Mar 2001) $ by $Author: warmenhoven $.
+STATUS of GAIM CVS tree. Last modified $Date: 2001-03-23 07:15:02 -0500 (Fri, 23 Mar 2001) $ by $Author: warmenhoven $.
 
 This file is meant to provide gaim users who use the CVS version to see whether
 they actually want to compile what they just checked out. Gaim CVS is usually
@@ -76,7 +76,7 @@
 Oscar can get people's away messages, so you should use it if that's what's
 important to you. Oscar also supports requesting and accepting Direct IM
 connections, but doesn't yet let you send/receive files through this or through
-the Get File/Send File method.
+the Get File/Send File method. Permit/Deny lists should work properly now.
 
 
 Yahoo (Eric)
--- a/TODO	Fri Mar 23 11:37:41 2001 +0000
+++ b/TODO	Fri Mar 23 12:15:02 2001 +0000
@@ -1,6 +1,5 @@
 --- STUFF FOR 0.11.0 RELEASE ---
 
-	Oscar blocking
 	Actions (e.g. /op) for IRC
 	Chat for Yahoo/ICQ/MSN(??)
 	File transfer for Yahoo/ICQ/Oscar/Napster
--- a/src/oscar.c	Fri Mar 23 11:37:41 2001 +0000
+++ b/src/oscar.c	Fri Mar 23 12:15:02 2001 +0000
@@ -2376,30 +2376,6 @@
 	gtk_widget_show(entry);
 }
 
-static void oscar_add_permit(struct gaim_connection *gc, char *who) {
-	struct oscar_data *od = (struct oscar_data *)gc->proto_data;
-	if (gc->permdeny != 3) return;
-	aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, who);
-}
-
-static void oscar_add_deny(struct gaim_connection *gc, char *who) {
-	struct oscar_data *od = (struct oscar_data *)gc->proto_data;
-	if (gc->permdeny != 4) return;
-	aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYADD, who);
-}
-
-static void oscar_rem_permit(struct gaim_connection *gc, char *who) {
-	struct oscar_data *od = (struct oscar_data *)gc->proto_data;
-	if (gc->permdeny != 3) return;
-	aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITREMOVE, who);
-}
-
-static void oscar_rem_deny(struct gaim_connection *gc, char *who) {
-	struct oscar_data *od = (struct oscar_data *)gc->proto_data;
-	if (gc->permdeny != 4) return;
-	aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYREMOVE, who);
-}
-
 static void oscar_set_permit_deny(struct gaim_connection *gc) {
 	struct oscar_data *od = (struct oscar_data *)gc->proto_data;
 	GSList *list;
@@ -2415,18 +2391,18 @@
 		break;
 	case 3:
 		list = gc->permit;
-		at = g_snprintf(buf, sizeof(buf), "%s", gc->username);
+		at = 0;
 		while (list) {
-			at += g_snprintf(buf + at, sizeof(buf) - at, "&%s", (char *)list->data);
+			at += g_snprintf(buf + at, sizeof(buf) - at, "%s&", (char *)list->data);
 			list = list->next;
 		}
 		aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, buf);
 		break;
 	case 4:
 		list = gc->deny;
-		at = g_snprintf(buf, sizeof(buf), "%s", gc->username);
+		at = 0;
 		while (list) {
-			at += g_snprintf(buf + at, sizeof(buf) - at, "&%s", (char *)list->data);
+			at += g_snprintf(buf + at, sizeof(buf) - at, "%s&", (char *)list->data);
 			list = list->next;
 		}
 		aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYADD, buf);
@@ -2436,6 +2412,30 @@
 	}
 }
 
+static void oscar_add_permit(struct gaim_connection *gc, char *who) {
+	struct oscar_data *od = (struct oscar_data *)gc->proto_data;
+	if (gc->permdeny != 3) return;
+	oscar_set_permit_deny(gc);
+}
+
+static void oscar_add_deny(struct gaim_connection *gc, char *who) {
+	struct oscar_data *od = (struct oscar_data *)gc->proto_data;
+	if (gc->permdeny != 4) return;
+	oscar_set_permit_deny(gc);
+}
+
+static void oscar_rem_permit(struct gaim_connection *gc, char *who) {
+	struct oscar_data *od = (struct oscar_data *)gc->proto_data;
+	if (gc->permdeny != 3) return;
+	oscar_set_permit_deny(gc);
+}
+
+static void oscar_rem_deny(struct gaim_connection *gc, char *who) {
+	struct oscar_data *od = (struct oscar_data *)gc->proto_data;
+	if (gc->permdeny != 4) return;
+	oscar_set_permit_deny(gc);
+}
+
 static void oscar_draw_new_user(GtkWidget *box)
 {
 	GtkWidget *label;