comparison libpurple/protocols/oscar/oscar.c @ 27360:979031db48c1

Slightly better error messages
author Mark Doliner <mark@kingant.net>
date Sat, 04 Jul 2009 01:06:23 +0000
parents 76cf0b261e25
children 46e0f65b14a1 f058edca3d66
comparison
equal deleted inserted replaced
27354:802de68c9fc3 27360:979031db48c1
1880 if (info->errorcode || !info->bosip || !info->cookielen || !info->cookie) { 1880 if (info->errorcode || !info->bosip || !info->cookielen || !info->cookie) {
1881 char buf[256]; 1881 char buf[256];
1882 switch (info->errorcode) { 1882 switch (info->errorcode) {
1883 case 0x01: 1883 case 0x01:
1884 /* Unregistered username */ 1884 /* Unregistered username */
1885 purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_INVALID_USERNAME, _("Invalid username.")); 1885 purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_INVALID_USERNAME, _("Username does not exist"));
1886 break; 1886 break;
1887 case 0x05: 1887 case 0x05:
1888 /* Incorrect password */ 1888 /* Incorrect password */
1889 if (!purple_account_get_remember_password(account)) 1889 if (!purple_account_get_remember_password(account))
1890 purple_account_set_password(account, NULL); 1890 purple_account_set_password(account, NULL);
1915 case 0x1d: 1915 case 0x1d:
1916 /* IP address connecting too frequently */ 1916 /* IP address connecting too frequently */
1917 purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_OTHER_ERROR, _("You have been connecting and disconnecting too frequently. Wait a minute and try again. If you continue to try, you will need to wait even longer.")); 1917 purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_OTHER_ERROR, _("You have been connecting and disconnecting too frequently. Wait a minute and try again. If you continue to try, you will need to wait even longer."));
1918 break; 1918 break;
1919 default: 1919 default:
1920 purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED, _("Authentication failed")); 1920 purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED, _("Unknown reason"));
1921 break; 1921 break;
1922 } 1922 }
1923 purple_debug_info("oscar", "Login Error Code 0x%04hx\n", info->errorcode); 1923 purple_debug_info("oscar", "Login Error Code 0x%04hx\n", info->errorcode);
1924 purple_debug_info("oscar", "Error URL: %s\n", info->errorurl ? info->errorurl : ""); 1924 purple_debug_info("oscar", "Error URL: %s\n", info->errorurl ? info->errorurl : "");
1925 return 1; 1925 return 1;