public int xgettrust(int kind, String fmsId) throws IOException {
        if (!supportsXGETTRUST()) {
            return -1; // Freetalk doesn't support trust extensions.
        }
        send(String.format("XGETTRUST %s %s", trustKindToString(kind), fmsId));
        String reply = read();
        StatusResponse response = parseResponse(reply, false);
        if (response.getStatus() == 480) {
            // This happens for deleted identities in FMS.
            // 480 Identity not found
            return -1;
        }
        if (response.getStatus() < 200 || response.getStatus() > 299) {
            throw new IOException("XGETTRUST NNTP request failed: " + reply);
        }
        String fields[] = reply.split(" ");
        if (fields.length != 2) {
            throw new IOException("Couldn't parse reply: " + reply);
        }
        if (fields[1].equals("null")) {
            return -1;
        } else {
            try {
                return Integer.parseInt(fields[1]);
            } catch (NumberFormatException nfe) {
                throw new IOException("Couldn't parse reply: " + reply);
            }
        }
    }