| 1576 /* We now know are our own username, only after we're logged in.. |
1576 /* We now know are our own username, only after we're logged in.. |
| 1577 * which is weird, but happens because you login with your email |
1577 * which is weird, but happens because you login with your email |
| 1578 * address and not username. Will be freed in msim_session_destroy(). */ |
1578 * address and not username. Will be freed in msim_session_destroy(). */ |
| 1579 session->username = msim_msg_get_string(msg, "uniquenick"); |
1579 session->username = msim_msg_get_string(msg, "uniquenick"); |
| 1580 |
1580 |
| 1581 /* Set display name to username (otherwise will show email address) */ |
|
| 1582 purple_connection_set_display_name(session->gc, session->username); |
|
| 1583 |
|
| 1584 /* If user lacks a username, help them get one. */ |
1581 /* If user lacks a username, help them get one. */ |
| 1585 if (msim_msg_get_integer(msg, "uniquenick") == session->userid) { |
1582 if (msim_msg_get_integer(msg, "uniquenick") == session->userid) { |
| 1586 purple_debug_info("msim_is_username_set", "no username is set\n"); |
1583 purple_debug_info("msim_is_username_set", "no username is set\n"); |
| 1587 purple_request_yes_no(session->gc, |
1584 purple_request_yes_no(session->gc, |
| 1588 _("MySpaceIM - No Username Set"), |
1585 _("MySpaceIM - No Username Set"), |
| 1611 /* The session is now set up, ready to be connected. This emits the |
1608 /* The session is now set up, ready to be connected. This emits the |
| 1612 * signedOn signal, so clients can now do anything with msimprpl, and |
1609 * signedOn signal, so clients can now do anything with msimprpl, and |
| 1613 * we're ready for it (session key, userid, username all setup). */ |
1610 * we're ready for it (session key, userid, username all setup). */ |
| 1614 purple_connection_update_progress(session->gc, _("Connected"), 3, 4); |
1611 purple_connection_update_progress(session->gc, _("Connected"), 3, 4); |
| 1615 purple_connection_set_state(session->gc, PURPLE_CONNECTED); |
1612 purple_connection_set_state(session->gc, PURPLE_CONNECTED); |
| |
1613 |
| |
1614 /* Set display name to username (otherwise will show email address) */ |
| |
1615 purple_connection_set_display_name(session->gc, session->username); |
| 1616 |
1616 |
| 1617 body = msim_msg_new( |
1617 body = msim_msg_new( |
| 1618 "UserID", MSIM_TYPE_INTEGER, session->userid, |
1618 "UserID", MSIM_TYPE_INTEGER, session->userid, |
| 1619 NULL); |
1619 NULL); |
| 1620 |
1620 |