+ ITDebugLog(@"Server requires password.");
+ //Check to see if a password is set in defaults
+ if ([[NSUserDefaults standardUserDefaults] dataForKey:@"connectPassword"] == nil) {
+ ITDebugLog(@"Asking for password.");
+ if (![[PreferencesController sharedPrefs] showPasswordPanel]) {
+ ITDebugLog(@"Giving up connection attempt.");
+ [self disconnect];
+ return -1;
+ }
+ }
+
+ //Send the password