don't subject remote users to chm_nonotice

This commit is contained in:
Jess Porter 2022-01-16 18:06:53 +00:00 committed by GitHub
parent 5a1b54fddc
commit 042218080e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,8 +52,11 @@ chm_nonotice_process(void *data_)
{ {
hook_data_privmsg_channel *data = data_; hook_data_privmsg_channel *data = data_;
/* don't waste CPU if message is already blocked */ /*
if (data->approved || data->msgtype != MESSAGE_TYPE_NOTICE) * don't waste CPU if message is already blocked, only block notices,
* only check messages sourced from local clients (so we don't block services notices)
*/
if (data->approved || data->msgtype != MESSAGE_TYPE_NOTICE || !MyClient(data->source_p))
return; return;
/* block all notices except CTCPs; use chm_noctcp to block CTCPs. */ /* block all notices except CTCPs; use chm_noctcp to block CTCPs. */