0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-29 00:44:17 +01:00

chm_nonotice: Ignore CTCP and send ERR_CANNOTSENDTOCHAN if a message is being blocked.

This commit is contained in:
Keith Buck 2012-07-31 06:37:33 +00:00
parent f0c778d701
commit 0d0f34c322

View file

@ -50,9 +50,11 @@ chm_nonotice_process(hook_data_privmsg_channel *data)
if (data->approved || data->msgtype != MESSAGE_TYPE_NOTICE)
return;
if (data->chptr->mode.mode & mode_nonotice)
/* block all notices except CTCPs; use chm_noctcp to block CTCPs. */
if (data->chptr->mode.mode & mode_nonotice && *data->text != '\001')
{
data->approved = ERR_CUSTOM;
sendto_one_numeric(data->source_p, ERR_CANNOTSENDTOCHAN, form_str(ERR_CANNOTSENDTOCHAN), data->chptr->chname);
data->approved = ERR_CANNOTSENDTOCHAN;
return;
}
}