channel: Move flood_attack_channel() to a boolean
This commit is contained in:
parent
216f58a27c
commit
3b9507d0e9
2 changed files with 6 additions and 6 deletions
|
@ -213,7 +213,7 @@ extern void destroy_channel(struct Channel *);
|
|||
|
||||
extern int can_send(struct Channel *chptr, struct Client *who,
|
||||
struct membership *);
|
||||
extern int flood_attack_channel(int p_or_n, struct Client *source_p,
|
||||
extern bool flood_attack_channel(int p_or_n, struct Client *source_p,
|
||||
struct Channel *chptr, char *chname);
|
||||
extern int is_banned(struct Channel *chptr, struct Client *who,
|
||||
struct membership *msptr, const char *, const char *, const char **);
|
||||
|
|
|
@ -902,10 +902,10 @@ can_send(struct Channel *chptr, struct Client *source_p, struct membership *mspt
|
|||
* says NOTICE must not auto reply
|
||||
* - pointer to source Client
|
||||
* - pointer to target channel
|
||||
* output - 1 if target is under flood attack
|
||||
* output - true if target is under flood attack
|
||||
* side effects - check for flood attack on target chptr
|
||||
*/
|
||||
int
|
||||
bool
|
||||
flood_attack_channel(int p_or_n, struct Client *source_p, struct Channel *chptr, char *chname)
|
||||
{
|
||||
int delta;
|
||||
|
@ -943,13 +943,13 @@ flood_attack_channel(int p_or_n, struct Client *source_p, struct Channel *chptr,
|
|||
sendto_one(source_p,
|
||||
":%s NOTICE %s :*** Message to %s throttled due to flooding",
|
||||
me.name, source_p->name, chptr->chname);
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
chptr->received_number_of_privmsgs++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* find_bannickchange_channel()
|
||||
|
|
Loading…
Reference in a new issue