rem: DBG("XJAB: xj_jcon_is_ready: destination=jabber\n");
context: int xj_jcon_is_ready(xj_jcon jbc, char *to, int tol, char dl){	char *p;	str sto;	xj_jconf jcf = NULL;	if(!jbc || !to || tol <= 0)		return -1;		sto.s = to;	sto.len = tol;	if(!xj_jconf_check_addr(&sto, dl))	{		DBG("XJAB: xj_jcon_is_ready: destination=conference\n");				if((jcf=xj_jcon_get_jconf(jbc, &sto, dl))!=NULL)			return (jcf->status & XJ_JCONF_READY)?0:3;				DBG("XJAB: xj_jcon_is_ready: conference does not exist\n");		return -1;	}		p = to;	while(p < to+tol && *p!='@') 		p++;	if(p>=to+tol)		return -1;	p++;	if(!strncasecmp(p, XJ_AIM_NAME, XJ_AIM_LEN))		return (jbc->ready & XJ_NET_AIM)?0:((jbc->allowed & XJ_NET_AIM)?1:2);		if(!strncasecmp(p, XJ_ICQ_NAME, XJ_ICQ_LEN))		return (jbc->ready & XJ_NET_ICQ)?0:((jbc->allowed & XJ_NET_ICQ)?1:2);		if(!strncasecmp(p, XJ_MSN_NAME, XJ_MSN_LEN))		return (jbc->ready & XJ_NET_MSN)?0:((jbc->allowed & XJ_NET_MSN)?1:2);	if(!strncasecmp(p, XJ_YAH_NAME, XJ_YAH_LEN))		return (jbc->ready & XJ_NET_YAH)?0:((jbc->allowed & XJ_NET_YAH)?1:2);	DBG("XJAB: xj_jcon_is_ready: destination=jabber\n");		return 0;}