diff --git a/include/channel.h b/include/channel.h index e666279a..19ca532f 100644 --- a/include/channel.h +++ b/include/channel.h @@ -32,6 +32,7 @@ #define MAXMODEPARAMSSERV 10 #include +#include "hook.h" struct Client; @@ -248,7 +249,7 @@ extern void destroy_channel(struct Channel *); extern int can_send(struct Channel *chptr, struct Client *who, struct membership *); -extern bool flood_attack_channel(int p_or_n, struct Client *source_p, +extern bool flood_attack_channel(enum message_type msgtype, struct Client *source_p, struct Channel *chptr, char *chname); struct matchset; extern int is_banned(struct Channel *chptr, struct Client *who, diff --git a/ircd/channel.c b/ircd/channel.c index 17b840cc..9c67aaab 100644 --- a/ircd/channel.c +++ b/ircd/channel.c @@ -861,7 +861,7 @@ can_send(struct Channel *chptr, struct Client *source_p, struct membership *mspt * side effects - check for flood attack on target chptr */ bool -flood_attack_channel(int p_or_n, struct Client *source_p, struct Channel *chptr, char *chname) +flood_attack_channel(enum message_type msgtype, struct Client *source_p, struct Channel *chptr, char *chname) { int delta; @@ -894,7 +894,7 @@ flood_attack_channel(int p_or_n, struct Client *source_p, struct Channel *chptr, /* Add a bit of penalty */ chptr->received_number_of_privmsgs += 2; } - if(MyClient(source_p) && (p_or_n != 1)) + if(MyClient(source_p) && (msgtype != MESSAGE_TYPE_NOTICE)) sendto_one(source_p, ":%s NOTICE %s :*** Message to %s throttled due to flooding", me.name, source_p->name, chptr->chname);