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;
}
}