738 |
|
*/ |
739 |
|
int |
740 |
|
can_send(struct Channel *chptr, struct Client *client_p, |
741 |
< |
struct Membership *member, const char *message) |
741 |
> |
struct Membership *member, const char *message, int notice) |
742 |
|
{ |
743 |
|
const struct MaskItem *conf = NULL; |
744 |
|
|
770 |
|
if ((chptr->mode.mode & MODE_MODREG) && !HasUMode(client_p, UMODE_REGISTERED)) |
771 |
|
return ERR_NEEDREGGEDNICK; |
772 |
|
|
773 |
+ |
if ((chptr->mode.mode & MODE_NONOTICE) && notice) |
774 |
+ |
return ERR_CANNOTSENDTOCHAN; |
775 |
+ |
|
776 |
|
/* Cache can send if banned */ |
777 |
|
if (MyClient(client_p)) |
778 |
|
{ |
1130 |
|
* only allow /part reasons in -m chans |
1131 |
|
*/ |
1132 |
|
if (*reason && (!MyConnect(client_p) || |
1133 |
< |
((can_send(chptr, client_p, member, reason) && |
1133 |
> |
((can_send(chptr, client_p, member, reason, 0) && |
1134 |
|
(client_p->connection->firsttime + ConfigGeneral.anti_spam_exit_message_time) |
1135 |
|
< CurrentTime)))) |
1136 |
|
{ |