changeset 318:35796808896a

[gaim-migrate @ 328] This is the way it's *SUPPOSED* to be done. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 02 Jun 2000 18:59:27 +0000
parents a91a898ea22d
children cea40691706c
files ChangeLog src/buddy.c src/server.c src/toc.c
diffstat 4 files changed, 28 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Jun 02 18:23:54 2000 +0000
+++ b/ChangeLog	Fri Jun 02 18:59:27 2000 +0000
@@ -9,6 +9,8 @@
 	* Fixed bug where GAIM sometimes doesn't find a font to use.
 	* Per-conversation font and color dialogs (thanks fflewddur)
 	* Chat in oscar works
+	* Even more fixes for the sign-on process, and now you don't flash when
+	  setting permit/deny lists.
 
 version 0.9.17 (05/31/2000):
 	* Automagic feature to check for new versions has been removed
--- a/src/buddy.c	Fri Jun 02 18:23:54 2000 +0000
+++ b/src/buddy.c	Fri Jun 02 18:59:27 2000 +0000
@@ -898,7 +898,9 @@
 
 struct group *add_group(char *group)
 {
-	struct group *g;
+	struct group *g = find_group(group);
+	if (g)
+		return g;
 	g = (struct group *)g_new0(struct group, 1);
 	if (!g)
 		return NULL;
--- a/src/server.c	Fri Jun 02 18:23:54 2000 +0000
+++ b/src/server.c	Fri Jun 02 18:59:27 2000 +0000
@@ -352,33 +352,36 @@
 	int at;
 	GList *list;
 
-        /* FIXME!  We flash here. */
-        if (permdeny == 1 || permdeny == 3) {
-        	g_snprintf(buf, sizeof(buf), "toc_add_permit");
+        if (permdeny == 1 || permdeny == 4) {
+        	g_snprintf(buf, sizeof(buf), "toc_add_deny");
                 sflap_send(buf, -1, TYPE_DATA);
         } else {
-                g_snprintf(buf, sizeof(buf), "toc_add_deny");
+                g_snprintf(buf, sizeof(buf), "toc_add_permit");
                 sflap_send(buf, -1, TYPE_DATA);
         }
 
 
-	at = g_snprintf(buf, sizeof(buf), "toc_add_permit");
-	list = permit;
-	while(list) {
-                at += g_snprintf(&buf[at], sizeof(buf) - at, " %s", normalize(list->data));
-                list = list->next;
+	if (permit) {
+		at = g_snprintf(buf, sizeof(buf), "toc_add_permit");
+		list = permit;
+		while(list) {
+	                at += g_snprintf(&buf[at], sizeof(buf) - at, " %s", normalize(list->data));
+	                list = list->next;
+		}
+		buf[at] = 0;
+		sflap_send(buf, -1, TYPE_DATA);
 	}
-	buf[at] = 0;
-	sflap_send(buf, -1, TYPE_DATA);
 
-	at = g_snprintf(buf, sizeof(buf), "toc_add_deny");
-	list = deny;
-	while(list) {
-                at += g_snprintf(&buf[at], sizeof(buf) - at, " %s", normalize(list->data));
-		list = list->next;
+	if (deny) {
+		at = g_snprintf(buf, sizeof(buf), "toc_add_deny");
+		list = deny;
+		while(list) {
+	                at += g_snprintf(&buf[at], sizeof(buf) - at, " %s", normalize(list->data));
+			list = list->next;
+		}
+		buf[at] = 0;
+		sflap_send(buf, -1, TYPE_DATA);
 	}
-	buf[at] = 0;
-	sflap_send(buf, -1, TYPE_DATA);
 #else
 	/* oscar requires us to do everyone at once (?) */
 	/* I think this code is OK now. */
--- a/src/toc.c	Fri Jun 02 18:23:54 2000 +0000
+++ b/src/toc.c	Fri Jun 02 18:59:27 2000 +0000
@@ -444,6 +444,8 @@
 
 	} else if (!strcasecmp(c, "CONFIG")) {
 		/* do we want to load the buddy list again here? */
+		c = strtok(NULL,":");
+		parse_toc_buddy_list(c, 0);
 	} else if (!strcasecmp(c, "ERROR")) {
 		/* This should be handled by wait_reply
 		c = strtok(NULL,":");