444 |
|
|
445 |
|
if (PubChannel(chptr) || is_member) |
446 |
|
{ |
447 |
< |
t = lbuf + sprintf(lbuf, RPL_NAMREPLY, |
447 |
> |
t = lbuf + sprintf(lbuf, form_str(RPL_NAMREPLY), |
448 |
|
me.name, source_p->name, |
449 |
|
channel_pub_or_secret(chptr), |
450 |
|
chptr->chname); |
494 |
|
} |
495 |
|
|
496 |
|
if (show_eon) |
497 |
< |
sendto_one(source_p, RPL_ENDOFNAMES, |
497 |
> |
sendto_one(source_p, form_str(RPL_ENDOFNAMES), |
498 |
|
me.name, source_p->name, chptr->chname); |
499 |
|
} |
500 |
|
|
648 |
|
* \return ERR_BANNEDFROMCHAN, ERR_INVITEONLYCHAN, ERR_CHANNELISFULL |
649 |
|
* or 0 if allowed to join. |
650 |
|
*/ |
651 |
< |
const char * |
651 |
> |
int |
652 |
|
can_join(struct Client *source_p, struct Channel *chptr, const char *key) |
653 |
|
{ |
654 |
|
if (is_banned(chptr, source_p)) |
677 |
|
chptr->mode.limit) |
678 |
|
return ERR_CHANNELISFULL; |
679 |
|
|
680 |
< |
return NULL; |
680 |
> |
return 0; |
681 |
|
} |
682 |
|
|
683 |
|
int |
720 |
|
if (MyClient(source_p) && !IsExemptResv(source_p)) |
721 |
|
if (!(HasUMode(source_p, UMODE_OPER) && ConfigFileEntry.oper_pass_resv)) |
722 |
|
if (!match_find_resv(chptr->chname) == ConfigChannel.restrict_channels) |
723 |
< |
return CAN_SEND_NO; |
723 |
> |
return ERR_CANNOTSENDTOCHAN; |
724 |
|
|
725 |
|
if (ms != NULL || (ms = find_channel_link(source_p, chptr))) |
726 |
|
{ |
731 |
|
if (ConfigChannel.quiet_on_ban && MyClient(source_p)) |
732 |
|
{ |
733 |
|
if (ms->flags & CHFL_BAN_SILENCED) |
734 |
< |
return CAN_SEND_NO; |
734 |
> |
return ERR_CANNOTSENDTOCHAN; |
735 |
|
|
736 |
|
if (!(ms->flags & CHFL_BAN_CHECKED)) |
737 |
|
{ |
738 |
|
if (is_banned(chptr, source_p)) |
739 |
|
{ |
740 |
|
ms->flags |= (CHFL_BAN_CHECKED|CHFL_BAN_SILENCED); |
741 |
< |
return CAN_SEND_NO; |
741 |
> |
return ERR_CANNOTSENDTOCHAN; |
742 |
|
} |
743 |
|
|
744 |
|
ms->flags |= CHFL_BAN_CHECKED; |
746 |
|
} |
747 |
|
} |
748 |
|
else if (chptr->mode.mode & MODE_NOPRIVMSGS) |
749 |
< |
return CAN_SEND_NO; |
749 |
> |
return ERR_CANNOTSENDTOCHAN; |
750 |
|
|
751 |
|
if (chptr->mode.mode & MODE_MODERATED) |
752 |
< |
return CAN_SEND_NO; |
752 |
> |
return ERR_CANNOTSENDTOCHAN; |
753 |
|
|
754 |
|
return CAN_SEND_NONOP; |
755 |
|
} |