Add oper:free_target (#374)

Co-authored-by: Ed Kellett <e@kellett.im>
This commit is contained in:
Jess Porter 2022-09-26 19:50:11 +01:00 committed by GitHub
parent 1f8c7ce5ca
commit 00ba30c175
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -468,6 +468,7 @@ privset "local_op" {
* oper:grant: allows using the GRANT command
* usermode:servnotice: allows setting +s
* oper:message: allows opers to bypass CALLERID (usermode +g)
* oper:free_target: messages to the oper bypass flood controls
*
* Privileges provided by extensions include:
*

View file

@ -876,7 +876,7 @@ flood_attack_client(enum message_type msgtype, struct Client *source_p, struct C
* and msg user@server.
* -- jilles
*/
if(GlobalSetOptions.floodcount && IsClient(source_p) && source_p != target_p && !IsService(target_p))
if(GlobalSetOptions.floodcount && IsClient(source_p) && source_p != target_p && !IsService(target_p) && !HasPrivilege(target_p, "oper:free_target"))
{
if((target_p->first_received_message_time + 1) < rb_current_time())
{