@Override
	public void actionPerformed(ActionEvent e) {
		if(e.getSource() == inputText) {
			if(inputText.getText().trim().equals("")) { resetInputField(); return;}
			/** Look for it every time, if it's not there he's probably offline. */
			NetworkSharedUser sendTo = Users.getUserById(targetUserId);
			if(sendTo == null) {
				if(targetUserId == -1) {
					NetworkEvent messageEvent = Events.createNewEvent(ClientContext.clientChannel);
					BroadcastMessage broadCast = new BroadcastMessage(inputText.getText());
					messageEvent.setMessage(broadCast);
					messageEvent.send();
					resetInputField();
				}
			} else {
				// If the target user id is -1, it's the global channel.
				NetworkEvent messageEvent = Events.createNewEvent(ClientContext.clientChannel);
				PrivateMessage pm = new PrivateMessage(targetUserId, inputText.getText());
				messageEvent.setMessage(pm);
				messageEvent.send();
				addText("[You]: " + inputText.getText());
				resetInputField();
			}
		}
	}