changeset 19658:15cb06e2d387

merge of 'cce02af7eb2fb114cb0f640979554b7de3a80e96' and 'db5ad5300e844751f9abf8702f4e4a8369dfef8e'
author John Bailey <rekkanoryo@rekkanoryo.org>
date Thu, 06 Sep 2007 05:58:52 +0000
parents 9968fff36e20 (diff) 1729367f0a4f (current diff)
children b4572d639bb4 3617681a2694
files libpurple/protocols/myspace/myspace.c
diffstat 1 files changed, 17 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/myspace/myspace.c	Wed Sep 05 23:51:16 2007 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Thu Sep 06 05:58:52 2007 +0000
@@ -1543,6 +1543,12 @@
 
 	if (msim_msg_get_integer(msg, "uniquenick") == session->userid) {
 		purple_debug_info("msim_we_are_logged_on", "TODO: pick username\n");
+		/* No username is set. */
+		purple_notify_error(session->account, 
+				_("No username set"),
+				_("Please go to http://editprofile.myspace.com/index.cfm?fuseaction=profile.username and choose a username and try to login again."), NULL);
+		purple_connection_error(session->gc, _("No username set"));
+		return FALSE;
 	}
 
 	body = msim_msg_new(
@@ -1775,6 +1781,9 @@
 	purple_debug_info("msim", "msim_error (sesskey=%d): %s\n", 
 			session->sesskey, full_errmsg);
 
+	purple_notify_error(session->account, g_strdup(_("MySpaceIM Error")), 
+			full_errmsg, NULL);
+
 	/* Destroy session if fatal. */
 	if (msim_msg_get(msg, "fatal")) {
 		purple_debug_info("msim", "fatal error, closing\n");
@@ -1864,9 +1873,14 @@
 		purple_debug_info("msim", "msim_status: found buddy %s\n", username);
 	}
 
-	/* The status headline is plaintext, but libpurple treats it as HTML,
-	 * so escape any HTML characters to their entity equivalents. */
-	status_headline_escaped = g_markup_escape_text(status_headline, strlen(status_headline));
+	if (status_headline) {
+		/* The status headline is plaintext, but libpurple treats it as HTML,
+		 * so escape any HTML characters to their entity equivalents. */
+		status_headline_escaped = g_markup_escape_text(status_headline, strlen(status_headline));
+	} else {
+		status_headline_escaped = NULL;
+	}
+
 	g_free(status_headline);
 
 	if (user->headline)