public void run(){
		Misc.println("[Socket] New client on IP " + RemoteIP + "! Thread ID: " + ThreadID + ".");
		try {
			inFromClient = new BufferedReader(new InputStreamReader(socket.getInputStream()));//Get Input
			outToClient = new DataOutputStream(socket.getOutputStream());//Get Output
			sendLoginInformation();//Send Information
		} catch (IOException e){
			Misc.servere(e.toString());
		}
		network = new Network(this, socket);
		while(socket.isConnected() && !socket.isClosed()){
			try {
				line = this.inFromClient.readLine().trim();
				String[] userInfo = line.split(" ");
				if(userInfo[0].startsWith("USER")) {
					user = new User(userInfo[1], userInfo[2], userInfo[3], ThreadID, this);
					this.ircServer.addUser(user, user.getUsername());
					usersOnline += 1;
					sendText("Logged in as " + user.getHostMask());
					sql.write(user.getUsername() + ":" + user.getHostMask(), "nicks");
					sql.getNickIdent(user.getUsername());
				}
				Misc.println("[Socket] Received: \"" + line + "\" in thread " + ThreadID + ".");
			} catch (SocketException e) {
				closeSocket();
				break;
			} catch (IOException e) {
				Misc.servere(e.toString());
				closeSocket();
			} catch (NullPointerException e) {
				closeSocket();
				break;
			}
			new Command(line, this);
		}
		Misc.println("[Socket] User on " + RemoteIP + " disconnected. (Thread ID was " + ThreadID + ")");
		try {
			ircServer.clients.remove(this);
			usersOnline -= 1;
		} catch (IndexOutOfBoundsException e){
			Misc.servere("[Socket][ERROR] Could not remove thread from list.");
		}
	}