1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-10 15:23:12 +02:00

All violatons of target-flood, nick-flood, join-flood, away-flood,

invite-flood, knock-flood, max-concurrent-conversations are now
reported to opers with the snomask 'f' (flood).
This commit is contained in:
Bram Matthys
2021-05-30 19:09:46 +02:00
parent cb604d6df0
commit 5acef88ceb
4 changed files with 26 additions and 0 deletions
+2
View File
@@ -259,6 +259,7 @@ int targetfloodprot_can_send_to_channel(Client *client, Channel *channel, Member
if (flood->cnt[what] >= channelcfg->cnt[what])
{
/* Flood detected */
flood_limit_exceeded_log(client, "target-flood-channel");
snprintf(errbuf, sizeof(errbuf), "Channel is being flooded. Message not delivered.");
*errmsg = errbuf;
return HOOK_DENY;
@@ -305,6 +306,7 @@ int targetfloodprot_can_send_to_user(Client *client, Client *target, char **text
if (flood->cnt[what] >= privatecfg->cnt[what])
{
/* Flood detected */
flood_limit_exceeded_log(client, "target-flood-user");
snprintf(errbuf, sizeof(errbuf), "User is being flooded. Message not delivered.");
*errmsg = errbuf;
return HOOK_DENY;