private void loadConnection() {


		Properties properties = new Properties();

		File connectionsDir = new File(settingsDir+fileSeparator+"connections");
		
		if(!connectionsDir.exists()){
			System.out.println("making new connecitons directory");
			connectionsDir.mkdir();
		}

		File[] files = new File(connectionsDir.getPath()).listFiles();
		for(File n : files) {
			if(Character.isLetterOrDigit(n.getName().charAt(0))) {
				loadedConnection = true;
				System.out.println(n.getAbsolutePath());
				FileInputStream in;
				try {
					in = new FileInputStream(n);
					properties.load(in);
					in.close();
				} catch (FileNotFoundException e) {
					System.err.println("You seem to not have a settings file. Please create one.");
				} catch (IOException e) {
					System.err.println("Error loading file into properties.");
				}

				name = properties.getProperty("name", "");
				host = properties.getProperty("host", "");
				pass = properties.getProperty("pass", "");
				nick = properties.getProperty("nick", "");
				username = properties.getProperty("username", "");
				realname = properties.getProperty("realname", "");
				encoding = properties.getProperty("encoding", "");
				port = Integer.parseInt(properties.getProperty("port"));
				ssl = Boolean.parseBoolean(properties.getProperty("ssl"));
				channels = properties.getProperty("channels","");
				

				if(ssl) {
					beginSSLIRCConnection(name, host, port, pass, nick, 
							username, realname, encoding, channels);
				} else {
					beginIRCConnection(name, host, port, pass, nick, 
							username, realname, encoding, channels);
				}
				try {
					Thread.sleep(4000);
				} catch (InterruptedException e) {

				}
			}
		}
//		if(!loadedConnection) {
//			new NewServerConfigWindow();
//		}
	}