changeset 4344:d6f1086d52a6

[gaim-migrate @ 4609] A few small changes... The "orphans" groups should stop reappearing every time you sign online. Twas a case of too much error checking. Buddies, permits, and denies with empty names will all be deleted automatically by the cleaning function. This should never really happen, but somehow one of my accounts had some empty-named permit buddies, so I threw it in here. I also took out some BR tags before some HR tags. I really really really think it looks better this way. Feel free to disagree. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 19 Jan 2003 07:35:18 +0000
parents 36cb0bb95b9c
children 38e275e1a793
files src/protocols/oscar/oscar.c src/protocols/oscar/ssi.c
diffstat 2 files changed, 26 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Sun Jan 19 03:29:00 2003 +0000
+++ b/src/protocols/oscar/oscar.c	Sun Jan 19 07:35:18 2003 +0000
@@ -2495,9 +2495,9 @@
 			}
 
 			if (evilhack)
-				dialog_msg = g_strdup_printf(_("<B>UIN:</B> %s<BR><B>Status:</B> %s<BR><HR>%s<BR>"), who, status_msg, g_strjoinv("<BR>", splitmsg));
+				dialog_msg = g_strdup_printf(_("<B>UIN:</B> %s<BR><B>Status:</B> %s<HR>%s"), who, status_msg, g_strjoinv("<BR>", splitmsg));
 			else
-				dialog_msg = g_strdup_printf(_("<B>Status:</B> %s<BR><HR>%s<BR>"), status_msg, g_strjoinv("<BR>", splitmsg));
+				dialog_msg = g_strdup_printf(_("<B>Status:</B> %s<HR>%s"), status_msg, g_strjoinv("<BR>", splitmsg));
 			g_show_info_text(gc, who, 2, dialog_msg, NULL);
 
 			g_free(status_msg);
@@ -2789,7 +2789,7 @@
 			"Warning Level : <B>%d %%</B><BR>\n"
 			"%s"
 			"%s"
-			"%s<BR>\n"
+			"%s\n"
 			"<HR>\n"),
 			info->sn, images(info->flags),
 			info->warnlevel/10,
@@ -2822,7 +2822,7 @@
 			g_show_info_text(gc, info->sn, 0,
 					 header,
 					 (utf8 && *utf8) ? away_subs(utf8, gc->username) : NULL,
-					 (utf8 && *utf8) ? "<BR><HR>" : NULL,
+					 (utf8 && *utf8) ? "<HR>" : NULL,
 					 NULL);
 		}
 	} else if (infotype == AIM_GETINFO_CAPABILITIES) {
@@ -3416,7 +3416,7 @@
 				g_show_info_text(gc, who, 0, buf, NULL);
 			else {
 				char *state_msg = gaim_icq_status((budlight->uc & 0xffff0000) >> 16);
-				g_show_info_text(gc, who, 2, buf, "<B>Status:</B> ", state_msg, "<BR>\n<HR><I>Remote client does not support sending status messages.</I><BR>\n", NULL);
+				g_show_info_text(gc, who, 2, buf, "<B>Status:</B> ", state_msg, "<HR>\n<I>Remote client does not support sending status messages.</I><BR>\n", NULL);
 				free(state_msg);
 			}
 		} else {
@@ -3473,7 +3473,7 @@
 	}
 	if (info->info) {
 		tmp = buf;
-		buf = g_strconcat(tmp, "<br><b>Additional Information:</b><br>", info->info, "<br><hr>\n", NULL);
+		buf = g_strconcat(tmp, "<br><b>Additional Information:</b><br>", info->info, "<hr>\n", NULL);
 		g_free(tmp);
 	}
 	if (info->homecity && info->homestate && info->homeaddr && info->homezip) {
@@ -4903,14 +4903,14 @@
 					aim_send_im_ch2_geticqmessage(od->sess, who, (budlight->uc & 0xffff0000) >> 16);
 				else {
 					char *state_msg = gaim_icq_status((budlight->uc & 0xffff0000) >> 16);
-					char *dialog_msg = g_strdup_printf(_("<B>UIN:</B> %s<BR><B>Status:</B> %s<BR><HR><I>Remote client does not support sending status messages.</I><BR>"), who, state_msg);
+					char *dialog_msg = g_strdup_printf(_("<B>UIN:</B> %s<BR><B>Status:</B> %s<HR><I>Remote client does not support sending status messages.</I><BR>"), who, state_msg);
 					g_show_info_text(gc, who, 2, dialog_msg, NULL);
 					free(state_msg);
 					free(dialog_msg);
 				}
 			else {
 				char *state_msg = gaim_icq_status((budlight->uc & 0xffff0000) >> 16);
-				char *dialog_msg = g_strdup_printf(_("<B>UIN:</B> %s<BR><B>Status:</B> %s<BR><HR><I>User has no status message.</I><BR>"), who, state_msg);
+				char *dialog_msg = g_strdup_printf(_("<B>UIN:</B> %s<BR><B>Status:</B> %s<HR><I>User has no status message.</I><BR>"), who, state_msg);
 				g_show_info_text(gc, who, 2, dialog_msg, NULL);
 				free(state_msg);
 				free(dialog_msg);
--- a/src/protocols/oscar/ssi.c	Sun Jan 19 03:29:00 2003 +0000
+++ b/src/protocols/oscar/ssi.c	Sun Jan 19 07:35:18 2003 +0000
@@ -643,6 +643,21 @@
 {
 	struct aim_ssi_item *cur, *next;
 
+	/* Delete any buddies, permits, or denies with empty names */
+	cur = sess->ssi.local;
+	while (cur) {
+		next = cur->next;
+		if (!cur->name) {
+			if (cur->type == AIM_SSI_TYPE_BUDDY)
+				aim_ssi_delbuddy(sess, conn, cur->name, NULL);
+			else if (cur->type == AIM_SSI_TYPE_PERMIT)
+				aim_ssi_delpermit(sess, conn, cur->name);
+			else if (cur->type == AIM_SSI_TYPE_DENY)
+				aim_ssi_deldeny(sess, conn, cur->name);
+		}
+		cur = next;
+	}
+
 	/* If there are any buddies directly in the master group, put them in a real group */
 	/* This will kind of mess up if you hit the item limit, but this function isn't too critical */
 	for (cur=sess->ssi.local; cur; cur=cur->next)
@@ -794,7 +809,7 @@
 {
 	struct aim_ssi_item *del;
 
-	if (!sess || !conn || !name || !group)
+	if (!sess || !conn || !name)
 		return -EINVAL;
 
 	/* Find the buddy */
@@ -838,7 +853,7 @@
 {
 	struct aim_ssi_item *del;
 
-	if (!sess || !conn || !name)
+	if (!sess || !conn)
 		return -EINVAL;
 
 	/* Find the item */
@@ -866,7 +881,7 @@
 {
 	struct aim_ssi_item *del;
 
-	if (!sess || !conn || !name)
+	if (!sess || !conn)
 		return -EINVAL;
 
 	/* Find the item */