@Override
    public void onPrivateMessage(PrivateMessageEvent e) {
        final String command = RUtils.getFirstWord(e.getMessage());
        if (!command.equalsIgnoreCase("authenticate")) return;
        final User u = e.getUser();
        if (!PermissionHandler.atLeastMod(u.getNick())) {
            e.respond("You are not allowed to do this.");
            return;
        }
        String[] args = e.getMessage().split(" ");
        args = (String[]) ArrayUtils.subarray(args, 1, args.length);
        if (args.length < 1) {
            e.respond("Usage: authenticate [key]");
            return;
        }
        final String salt = plugin.getConfig().getString("settings.auth.keys.salt", "");
        String key;
        try {
            key = hash(StringUtils.join(args, " ") + salt);
        } catch (NoSuchAlgorithmException ex) {
            e.respond("Internal exception: " + ex.getMessage());
            return;
        }
        final String checkAgainst = plugin.getConfig().getString("settings.auth.keys.users." + u.getNick(), "");
        if (checkAgainst.isEmpty()) {
            e.respond("There is no key stored for you!");
            return;
        }
        if (!checkAgainst.equals(key)) {
            e.respond("Invalid key!");
            return;
        }
        PermissionHandler.setAuthenticated(u.getNick(), u.getServer(), true);
        e.respond("Authenticated!");
    }