@Override
	public void onMessage(String channel, String sender, String message) {

		String filter = MdBtConstants.BOTNAME + ": ";

		boolean toMe = false;
		boolean shouldLearn = !sender.equals("habbes")
				&& !sender.equals("mlvn");

		if (message.startsWith(filter)) {
			toMe = true;
			message = message.replaceFirst(filter, "");
		}

		if (message.equals("reload plugins")) {
			String ret = reloadPlugins();

			sendMessage(channel, "Plugins loaded: " + ret);
			return;
		}

		for (MdBtPlugin p : plugins.values()) {
			if (p.getTriggerRegex().matcher(message).matches()) {
				sendMessage(channel, p.onMessage(channel, sender, message));
				return;
			}
		}

		if (message.indexOf(MdBtConstants.BOTNAME) != -1) {
			// Replace botname with "meg"
			message = message.replaceAll(MdBtConstants.BOTNAME, "meg");
			toMe = true;
		}

		if (shouldLearn) {
			brain.add(message);
		}

		if (toMe) {
			sendMessage(channel,
					shouldITalkToYou(sender) + brain.getSentence(findWordOfInterest(message)));
		}
	}