private boolean executeCommand(final String[] argv, final String sender,
			final String recipient) {
		final Module core = getCoreModule();
		if (core.hasCommand(argv[0])) {
			// first priority is assume core module.
			final String[] params = Arrays.copyOfRange(argv, 1, argv.length);
			return core.execute(argv[0], params, sender, recipient);
		} else if (getModuleEnabled(argv[0])) {
			// next priority is assume named module
			if (argv.length > 1) {
				final String[] params = Arrays
						.copyOfRange(argv, 2, argv.length);
				return getModule(argv[0]).execute(argv[1], params, sender,
						recipient);
			} else {
				sendResponse(recipient, sender + ": '" + argv[0]
						+ "' - is a module");
				return true;
			}
		} else {
			// finally, search all modules for the command
			final List<Module> candidates = new ArrayList<Module>();
			for (final Module mod : enabledModules.values()) {
				if (mod.hasCommand(argv[0])) {
					candidates.add(mod);
				}
			}
			if (candidates.size() == 1) {
				final String[] params = Arrays
						.copyOfRange(argv, 1, argv.length);
				return candidates.get(0).execute(argv[0], params, sender,
						recipient);
			} else if (candidates.size() > 1) {
				sendResponse(recipient, sender + ": ambiguous command.");
				sendResponse(recipient, sender + ": '" + argv[0]
						+ "' exists in the following modules:");
				String msg = "";
				for (int i = 0; i < candidates.size(); i++) {
					msg += candidates.get(i).getName();
					if ((i + 1) < candidates.size()) {
						msg += ", ";
					}
				}
				sendResponse(recipient, msg);
				return true;
			} else {
				return false;
			}
		}
	}