| 456 |
456 |
| 457 /* TODO: It should be possible to make this check unnecessary */ |
457 /* TODO: It should be possible to make this check unnecessary */ |
| 458 if(!PURPLE_CONNECTION_IS_VALID(gc)) { |
458 if(!PURPLE_CONNECTION_IS_VALID(gc)) { |
| 459 purple_ssl_close(gsc); |
459 purple_ssl_close(gsc); |
| 460 return; |
460 return; |
| 461 } |
461 } |
| 462 |
462 |
| 463 js = gc->proto_data; |
463 js = gc->proto_data; |
| 464 |
464 |
| 465 if(js->state == JABBER_STREAM_CONNECTING) |
465 if(js->state == JABBER_STREAM_CONNECTING) |
| 466 jabber_send_raw(js, "<?xml version='1.0' ?>", -1); |
466 jabber_send_raw(js, "<?xml version='1.0' ?>", -1); |
| 1729 |
1729 |
| 1730 purple_request_fields(js->gc, _("Change XMPP Password"), |
1730 purple_request_fields(js->gc, _("Change XMPP Password"), |
| 1731 _("Change XMPP Password"), _("Please enter your new password"), |
1731 _("Change XMPP Password"), _("Please enter your new password"), |
| 1732 fields, _("OK"), G_CALLBACK(jabber_password_change_cb), |
1732 fields, _("OK"), G_CALLBACK(jabber_password_change_cb), |
| 1733 _("Cancel"), NULL, |
1733 _("Cancel"), NULL, |
| 1734 purple_connection_get_account(gc), NULL, NULL, |
1734 purple_connection_get_account(gc), NULL, NULL, |
| 1735 js); |
1735 js); |
| 1736 } |
1736 } |
| 1737 |
1737 |
| 1738 GList *jabber_actions(PurplePlugin *plugin, gpointer context) |
1738 GList *jabber_actions(PurplePlugin *plugin, gpointer context) |
| 1739 { |
1739 { |
| 1897 } else if(xmlnode_get_child(packet, "mechanism-too-weak")) { |
1897 } else if(xmlnode_get_child(packet, "mechanism-too-weak")) { |
| 1898 js->gc->wants_to_die = TRUE; |
1898 js->gc->wants_to_die = TRUE; |
| 1899 text = _("Authorization mechanism too weak"); |
1899 text = _("Authorization mechanism too weak"); |
| 1900 } else if(xmlnode_get_child(packet, "not-authorized")) { |
1900 } else if(xmlnode_get_child(packet, "not-authorized")) { |
| 1901 js->gc->wants_to_die = TRUE; |
1901 js->gc->wants_to_die = TRUE; |
| |
1902 /* Clear the pasword if it isn't being saved */ |
| |
1903 if (!purple_account_get_remember_password(js->gc->account)) |
| |
1904 purple_account_set_password(js->gc->account, NULL); |
| 1902 text = _("Not Authorized"); |
1905 text = _("Not Authorized"); |
| 1903 } else if(xmlnode_get_child(packet, "temporary-auth-failure")) { |
1906 } else if(xmlnode_get_child(packet, "temporary-auth-failure")) { |
| 1904 text = _("Temporary Authentication Failure"); |
1907 text = _("Temporary Authentication Failure"); |
| 1905 } else { |
1908 } else { |
| 1906 js->gc->wants_to_die = TRUE; |
1909 js->gc->wants_to_die = TRUE; |