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:
parent
f0c778d701
commit
0d0f34c322
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue