CC->kill_me = 1;
}
else {
- cprintf("%d %s Citadel server ready.\n",
- CIT_OK, config.c_nodename);
+ cprintf("%d %s Citadel server ready.\n", CIT_OK, config.c_nodename);
+ CC->can_receive_im = 1;
}
}
if ( ((!strcasecmp(un, x_user))
|| (!strcasecmp(x_user, "broadcast")))
+ && (ccptr->can_receive_im)
&& ((ccptr->disable_exp == 0)
|| (CC->user.axlevel >= 6)) ) {
if (do_send) {
XML_SetElementHandler(XMPP->xp, xmpp_xml_start, xmpp_xml_end);
XML_SetCharacterDataHandler(XMPP->xp, xmpp_xml_chardata);
// XML_SetUserData(XMPP->xp, something...);
+
+ CC->can_receive_im = 1; /* This protocol is capable of receiving instant messages */
}
if (!CC->logged_in) return;
for (cptr = ContextList; cptr != NULL; cptr = cptr->next) {
- if (cptr->logged_in) {
- if (!strcasecmp(cptr->cs_inet_email, message_to)) {
- recp = cptr->user.fullname;
- }
+ if ( (cptr->logged_in)
+ && (cptr->can_receive_im)
+ && (!strcasecmp(cptr->cs_inet_email, message_to))
+ ) {
+ recp = cptr->user.fullname;
}
}
for (i=0; i<nContexts; i++) {
if (cptr[i].logged_in) {
if (
- (((cptr[i].cs_flags&CS_STEALTH)==0) || (aide)) /* aides see everyone */
- && (cptr[i].user.usernum != CC->user.usernum) /* don't show myself */
+ (((cptr[i].cs_flags&CS_STEALTH)==0) || (aide)) /* aides see everyone */
+ && (cptr[i].user.usernum != CC->user.usernum) /* don't show myself */
+ && (cptr[i].can_receive_im) /* IM-capable session */
) {
cprintf("<presence type=\"available\" from=\"%s\"></presence>",
cptr[i].cs_inet_email);
/* Count the visible sessions for this user */
for (i=0; i<nContexts; i++) {
if (cptr[i].logged_in) {
- if ( (!strcasecmp(cptr[i].cs_inet_email, presence_jid))
- && (((cptr[i].cs_flags&CS_STEALTH)==0) || (aide))
- ) {
+ if (
+ (!strcasecmp(cptr[i].cs_inet_email, presence_jid))
+ && (((cptr[i].cs_flags&CS_STEALTH)==0) || (aide))
+ && (cptr[i].can_receive_im)
+ ) {
++visible_sessions;
}
}
int is_async; /* Nonzero if client accepts async msgs */
int async_waiting; /* Nonzero if there are async msgs waiting */
int input_waiting; /* Nonzero if there is client input waiting */
+ int can_receive_im; /* Session is capable of receiving instant messages */
/* Client information */
int cs_clientdev; /* client developer ID */