private boolean hostMatch(Main plugin, String host, ListenerInfo info) {
        int split = host.lastIndexOf(':');
        if (split == -1) {
            plugin.getLogger().log(Level.WARNING, "Badly formatted host:port pair: {0}", host);
        }
        InetSocketAddress addr = info.getHost();
        String hostPart = host.substring(0, split);
        String portPart = host.substring(split+1);
        if (!"*".equals(hostPart)) {
            try {
                InetAddress hostAddr = InetAddress.getByName(hostPart);
                if (!hostAddr.equals(addr.getAddress())) {
                    return false;
                }
            } catch (UnknownHostException ex) {
                plugin.getLogger().log(Level.WARNING, "Unable to resolve server host: " + hostPart, ex);
                return false;
            }
        } 
        if (!"*".equals(portPart)) {
            try {
                int port = Integer.parseInt(portPart);
                if (port != addr.getPort()) {
                    return false;
                }
            } catch (NumberFormatException ex) {
                plugin.getLogger().log(Level.WARNING, "Unable to parse port number: " + portPart, ex);
                return false;
            }
        }
        return true;
    }