Dynamic Bans: Difference between revisions

From EggWiki
Jump to navigation Jump to search
(Created page with "__TOC__ == History of Dynamic Bans == Before channel services were common, Eggdrop's were used to ban unwanted users from channels. In general, an IRC server only allowed channels to have a certain number of bans placed in the channel at any given time. If this limit was reached, no additional bans could be placed and an unwanted user could continue their unwanted activities until a ban was removed from the channel ban list. But, by removing a previous ban, now that unw...")
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:
Before channel services were common, Eggdrop's were used to ban unwanted users from channels. In general, an IRC server only allowed channels to have a certain number of bans placed in the channel at any given time. If this limit was reached, no additional bans could be placed and an unwanted user could continue their unwanted activities until a ban was removed from the channel ban list. But, by removing a previous ban, now that unwanted user could join. Eggdrop addressed this problem by introducing "dynamic bans".  
Before channel services were common, Eggdrop's were used to ban unwanted users from channels. In general, an IRC server only allowed channels to have a certain number of bans placed in the channel at any given time. If this limit was reached, no additional bans could be placed and an unwanted user could continue their unwanted activities until a ban was removed from the channel ban list. But, by removing a previous ban, now that unwanted user could join. Eggdrop addressed this problem by introducing "dynamic bans".  


== Eggdrop's Dynamic Bans ==
== Eggdrop's Dynamic Ban System ==
Dynamic bans are a method where Eggdrop internally stores a much larger list of bans than a channel can, and only activates the ban when it sees a banned user entering the channel. When a ban is added to Eggdrop, the ban is saved to Eggdrop's internal ban system (saved in the .chan file, if you're interested in those details). Importantly, there is no limit on the number of bans Eggdrop can store internally. Once a ban has been placed by Eggdrop, a timer is activated and the ban will be removed after that time expires. By adding bans only when they are needed and then removing them, the channel ban list stays "clean" and never fills to a point where new bans can't be added.
Dynamic bans are a method where Eggdrop internally stores a much larger list of bans than a channel can, and only activates the ban when it sees a banned user entering the channel. When a ban is added to Eggdrop, the ban is saved to Eggdrop's internal ban system (saved in the .chan file, if you're interested in those details). Importantly, there is no limit on the number of bans Eggdrop can store internally. Once a ban has been placed by Eggdrop, a timer is activated and the ban will be removed after that time expires. By adding bans only when they are needed and then removing them, the channel ban list stays "clean" and never fills to a point where new bans can't be added.


== How do I deactivate Dynamic Bans? ==
== How do I deactivate Dynamic Bans? ==
Some people don't like dynamic bans. There are three ways you can disable this feature
Some people don't like dynamic bans. There are two ways you can disable this feature


=== Method 1: Disabling Dynamic Bans ===
=== Method 1: Disabling Dynamic Bans ===
Line 28: Line 28:


=== Method 2: Using Sticky Bans ===
=== Method 2: Using Sticky Bans ===
Sometimes you want
Sometimes you want Eggdrop to keep the channel ban list clean, but there is one or two users that keep joining over and over automatically. In this case, you may want to use a sticky ban. A sticky ban is a ban that is exempted from Eggdrop's removal of bans from a channel. If we read .help +ban, we see
  ###  +ban <hostmask> [channel] [%<XyXdXhXm>] [comment]
and
  Prefixing the comment with '*' will make the ban sticky.
This tells us that if we want to make a sticky ban that will not be removed by Eggdrop even with dynamic bans enabled, we would want to place a ban that looks something like
  .+ban *!*@*.aol.com *How is this ISP still used?
and the ban *!*@*.aol.com will not be removed.
 
=== Changing the ban removal time ===
We don't suggest using this method, but it is *a* way (it can cause issues later if you wish to change back)
By default, Eggdrop removes dynamic bans are removed after two hours. This setting can be changed, if we read .help chaninfo we see
        ban-time          Set here how long temporary bans will last (in
                          minutes). If you set this setting to 0, the bot will
                          never remove them.
We again use the chanset command to modify this channel setting. For example, to make the time longer, you could type
  .chanset #eggdrop ban-time 180
to change the value to 180 minutes.

Latest revision as of 17:17, 19 July 2022

History of Dynamic Bans

Before channel services were common, Eggdrop's were used to ban unwanted users from channels. In general, an IRC server only allowed channels to have a certain number of bans placed in the channel at any given time. If this limit was reached, no additional bans could be placed and an unwanted user could continue their unwanted activities until a ban was removed from the channel ban list. But, by removing a previous ban, now that unwanted user could join. Eggdrop addressed this problem by introducing "dynamic bans".

Eggdrop's Dynamic Ban System

Dynamic bans are a method where Eggdrop internally stores a much larger list of bans than a channel can, and only activates the ban when it sees a banned user entering the channel. When a ban is added to Eggdrop, the ban is saved to Eggdrop's internal ban system (saved in the .chan file, if you're interested in those details). Importantly, there is no limit on the number of bans Eggdrop can store internally. Once a ban has been placed by Eggdrop, a timer is activated and the ban will be removed after that time expires. By adding bans only when they are needed and then removing them, the channel ban list stays "clean" and never fills to a point where new bans can't be added.

How do I deactivate Dynamic Bans?

Some people don't like dynamic bans. There are two ways you can disable this feature

Method 1: Disabling Dynamic Bans

This is the proper method! From the partyline, read .help chanset and .help chaninfo. The chanset command is the command we'll be using to change a channel setting, and among other information, .help chanset shows us the syntax is

 ###  chanset <channel> <settings>

To find the setting we want to modify, we'll need to look at .help chaninfo (yes, there's a lot in there). Looking through all the available settings, we see

       dynamicbans    Only activate bans on the channel when necessary?
                      This keeps the channel's ban list from getting
                      excessively long. The bot still remembers every ban,
                      but it only activates a ban on the channel when it sees
                      someone join who matches that ban.

This tells us the setting we want to modify is dynamicbans. To deactivate dynamicbans, we'll type:

 .chanset #channel -dynamicbans

Congratulations! Eggdrop will no longer remove bans from the channel

Method 2: Using Sticky Bans

Sometimes you want Eggdrop to keep the channel ban list clean, but there is one or two users that keep joining over and over automatically. In this case, you may want to use a sticky ban. A sticky ban is a ban that is exempted from Eggdrop's removal of bans from a channel. If we read .help +ban, we see

 ###  +ban <hostmask> [channel] [%<XyXdXhXm>] [comment]

and

 Prefixing the comment with '*' will make the ban sticky.

This tells us that if we want to make a sticky ban that will not be removed by Eggdrop even with dynamic bans enabled, we would want to place a ban that looks something like

 .+ban *!*@*.aol.com *How is this ISP still used?

and the ban *!*@*.aol.com will not be removed.

Changing the ban removal time

We don't suggest using this method, but it is *a* way (it can cause issues later if you wish to change back) By default, Eggdrop removes dynamic bans are removed after two hours. This setting can be changed, if we read .help chaninfo we see

       ban-time          Set here how long temporary bans will last (in
                         minutes). If you set this setting to 0, the bot will
                         never remove them.

We again use the chanset command to modify this channel setting. For example, to make the time longer, you could type

 .chanset #eggdrop ban-time 180

to change the value to 180 minutes.