diff src/protocols/toc/toc.c @ 4687:283fb289c510

[gaim-migrate @ 4998] This is a new buddy list. Lots of things about it just Don't Work. I probably already know about those things, and you'd just be wasting my time in submitting a bug report about it. I decided that instead of getting it to all work perfectly before committing, that I'd get it in cvs, and slowly fix it with regular commits. That way, it's easier to keep track of things, and other developers can help. Plus, I'm getting pissed off at the buddy list and want it to die. It's kinda boring, and doing nothing but the buddy list for such a long time has just gotten me very bitter. After 0.60 is released later this week, Gaim will resume being fun. This week is going to be very stressful, though, I'm sure. Things you ought to know about this buddy list: - It crashes - It leaks - There's no way to edit the buddy list, or access offline buddies - Most of the menus and buttons and whatnot just plain ol' don't work. - Status icons are only implemented for AIM. That's mostly just because I'm lazy. As such, you may want to be wary of updating this. If you do decide to update this, you may want to learn "cvs update -D yesterday" as well :) All the art there is just placeholder art. You probably won't really have as many problems as it sounds like you will from reading this. This message is extra-negative to stress that I don't want to be bothered with complaints about something not working about it :). I'll repeat: If something doesn't work, I probably already know about it. If you want to actually help with something, I'd be delighted to have it. IM me. -s. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 10 Mar 2003 05:30:31 +0000
parents 42d53c416bb9
children e19f91053ad0
line wrap: on
line diff
--- a/src/protocols/toc/toc.c	Mon Mar 10 04:51:10 2003 +0000
+++ b/src/protocols/toc/toc.c	Mon Mar 10 05:30:31 2003 +0000
@@ -272,6 +272,50 @@
 	g_free(gc->proto_data);
 }
 
+static void toc_build_config(struct gaim_account *account, char *s, int len, gboolean show)
+{
+	GSList *grp = groups;
+	GSList *mem;
+	struct group *g;
+	struct buddy *b;
+	GSList *plist = account->permit;
+	GSList *dlist = account->deny;
+
+	int pos = 0;
+
+	if (!account->permdeny)
+		account->permdeny = 1;
+
+	pos += g_snprintf(&s[pos], len - pos, "m %d\n", account->permdeny);
+	while (len > pos && grp) {
+		g = (struct group *)grp->data;
+		if(gaim_group_on_account(g, account)) {
+			pos += g_snprintf(&s[pos], len - pos, "g %s\n", g->name);
+			mem = g->members;
+			while (len > pos && mem) {
+				b = (struct buddy *)mem->data;
+				if(b->account == account) {
+					pos += g_snprintf(&s[pos], len - pos, "b %s%s%s\n", b->name,
+							(show && b->alias[0]) ? ":" : "",
+							(show && b->alias[0]) ? b->alias : "");
+				}
+				mem = mem->next;
+			}
+		}
+		grp = g_slist_next(grp);
+	}
+
+	while (len > pos && plist) {
+		pos += g_snprintf(&s[pos], len - pos, "p %s\n", (char *)plist->data);
+		plist = plist->next;
+	}
+
+	while (len > pos && dlist) {
+		pos += g_snprintf(&s[pos], len - pos, "d %s\n", (char *)dlist->data);
+		dlist = dlist->next;
+	}
+}
+
 static int escape_message(char *msg)
 {
 	char *c, *cpy;
@@ -1241,8 +1285,11 @@
 	sflap_send(gc, "", 0, TYPE_KEEPALIVE);
 }
 
-static char **toc_list_icon(int uc)
+static const char *toc_list_icon(struct gaim_account *a, struct buddy *b)
 {
+	return "aim";
+}
+/*
 	if (uc & UC_UNAVAILABLE)
 		return (char **)away_icon_xpm;
 	if (uc & UC_AOL)
@@ -1256,7 +1303,7 @@
 	if (uc & UC_WIRELESS)
 		return (char **)wireless_icon_xpm;
 	return NULL;
-}
+	}*/
 
 static GList *toc_buddy_menu(struct gaim_connection *gc, char *who)
 {
@@ -1286,7 +1333,6 @@
 	g_snprintf(buf2, sizeof(buf2), "toc_add_permit %s", normalize(who));
 	sflap_send(gc, buf2, -1, TYPE_DATA);
 	toc_set_config(gc);
-	signoff_blocked(gc);
 }
 
 static void toc_add_deny(struct gaim_connection *gc, const char *who)
@@ -1297,7 +1343,6 @@
 	g_snprintf(buf2, sizeof(buf2), "toc_add_deny %s", normalize(who));
 	sflap_send(gc, buf2, -1, TYPE_DATA);
 	toc_set_config(gc);
-	signoff_blocked(gc);
 }
 
 static void toc_set_permit_deny(struct gaim_connection *gc)
@@ -1363,7 +1408,6 @@
 		break;
 	}
 	toc_set_config(gc);
-	signoff_blocked(gc);
 }
 
 static void toc_rem_permit(struct gaim_connection *gc, const char *who)