Clone Module
From Botnix
Overview
The clone module is designed to prevent cloning upon IRC channels. It maintains global counters, with per-channel clone behaviours.
For example, if user A joins #B and #C, and users B and C join #D, #E and #F with the same hostname, and your bot's clone threshold is three, actions will be taken as the total number of occurances of this user's host is three across all five channels (not two, as in many other bots) but action will only be taken where the user count exceeds the maximum set in the config.
Configuration
These directives must be placed within a channel block. All directives are optional. If a 'clones' directive is not defined, clone checking will not be active upon the channel.
channel "#foobar" {
clones "3"
clonereason "clones (<num> clones with a limit of <max>)"
cloneaction "kickban"
cloneexception "my.bot.host"
cloneexception "*.my.trusted.hosts"
}
The clone module supports three different directives as shown above and listed below:
- clones: This directive indicates the number of clones which triggers an action. If the number of clones is equal to or greater than this value the cloneaction value is acted upon.
- clonereason: This directive indicates the reason to display if a user is kicked for cloning. These can be defined on a per-channel basis. Within the reason, the following values can be used and will be replaced with the relevent values (the angled brackets in this case are literal):
- <num>: Will be replaced with the number of clones from the user's hostmask
- <max>: Will be replaced with the maximum number of allowed clones
If this directive is not specified, a default kick message is used in the form "Clones <num> clones of <max>)" for all kicks.
- cloneaction: The action to perform when cloning occurs. The parameter can be selected from the list below:
- kick: Kick the user from the channel using the clonereason message
- kickban: Kick the user from the channel using the clonereason message, and ban them
- deop: Deop the user if they are opped
- ban: Just ban the user
- devoice: Devoice the user if they are voiced
- quiet: Set a quiet-ban on servers which support it (+b ~q:host)
- cloneexception: You may specify zero or more of these directives which contain a wildcard host which is exempt from clone checking.
Commands
This module implements no commands.

