Command: add#
Summary#
Command | Default Level | Global Only? |
---|---|---|
add | 200 | no |
Description#
- Adds an entry to the
whitelist
orblacklist
- Clients joining channel will be scanned against lists when
mode
ison
orsecure
-
Secure Mode
Thesecure
mode is only available on networks usingircu
, such as Undernet or Quakenet.When in
secure
mode, a channel will be set to+Dm
to moderate the channel and delay the join or new users.All current users will be voiced, and a periodic timer will use
/names -d
to find new users, scan them, and only voice the users after they have passed the scans, thereby making the client visible to other users.This mode can be extremely effective when dealing with floodnets as the normal channel joins are never seen if the client is hit through some form of detection.
- Entry types supported:
user
: user ACCOUNT on network (e.g., X usernames on Undernet)host
orip
: host or IPrname
: realname field of clientregex
: regular expression using formatnick!user@host/realname
text
: text match, whereby forwhitelist
entries to make the bot responds withcomment
and forblacklist
entries the bot kickbans the client usingreason
as the kick messagecountry
: two digit code of the IP address country of originasn
: Autonomous System Number of the client's IP addresschan
: matching channels the user is in (from/whois
response)last
: lastN
users who recently joined channel
- Multiple values can be added of the same type with one command, by comma delimiting them
- Actions to take when joining clients match a list:
accept
: accept the client and stop further scansvoice
: voice the clientop
: op the clientban
: kickban the client (the only valid action forblacklist
entries)
- Allow
reason
to be optional, using configuration default for blacklist entries - Allow cumulative matching to allow act when a minimum of
joins
clients join the channel withinsecs
seconds. Once matched, hold the matching window open for a further optionalhold
seconds, for faster seubsequent matching. Default to1:1:1
Usage#
add ?chan? <white|black> <user|host|rname|regex|text|country|asn|chan|last> <value1,value2..> <accept|voice|op|ban?joins:secs:hold?> [reason|comment]
- Channel parameter is optional. If not given, the bot will default to the originating channel, the channel the user has the most access in, or lastly, the default Armour channel.
- Specifying a channel of
*
will add a global list entry, applying to all channels the bot has registered.
Examples#
user#
- Add username
Empus
towhitelist
and automaticallyop
when joining channels, using thereason
ofMy master!
: - Add all clients to the
blacklist
that have a network accountuser
withhack
in their username:@Empus | y add black user *hack* ban Hackers are not welcome @yolk | added user blacklist entry (id: 81 -- value: *hack* -- action: op -- reason: Hackers are not welcome)
Entry method
user
is only available for networks that useircu
such as Undernet or Quakenet.
host#
- Add IP
10.0.0.1
towhitelist
toaccept
clients, using thereason
oflocal machine
: - Add subnet
142.250.204.160/27
towhitelist
and accept clients usingMrBob's VPS
: - Add user@host mask with CIDR notation to
blacklist
: - Add hostmask
*!mrbob@*.isp.com
to blacklist tokickban
clients, using thereason
ofabusive user
-
Actions
Blacklist entries will acceptban
,b
,kb
,kickban
, andk
as all resulting inkickban
as the resulting action when a client matches the entry.Whitelist entries will accept:
accept
ora
to accept a clientop
oro
to op a clientvoice
orv
to voice a client
Action will default to
accept
forwhitelist
entries andkickban
for blacklist entries. Meaning, this field is optional and the below can also be used:
rname#
- Add realname
'Mr Bob'
toblacklist
tokickban
clients, using the default reason (from configuration): -
Wildcards
Wildcards are supported in all list entries:*
denotes any characters (zero times or more)?
denotes any single character (including a space)
regex#
- Add regex blacklist entry to
kickban
clients that have no resolved ident and have a nickname ending in two or more numbers: -
Warning
Regular expression matches are very powerful but extra care should be taken with the expression to ensure they do not hit innocent clients. -
Add regex blacklist entry to
kickban
clients with unresolved idents when3
or more join within2
seconds, usingfloodbot
as the reason: -
Same as above, but this time after a positive match, immediately match other clients within a
10
second window, extending by that same 10 seconds for each subsequent match: -
Limits
Cumulative limits in the form of
joins:secs:hold
can be used on anyhost
orregex
entries in theblacklist
. These can be a very effective tool to deal with floodbots by using more wider hostmasks and patterns but only matching when configured thresholds are reached.
text#
- Add a text match whitelist entry to make the bot respond with
Coke is better
when any client sayspepsi
: - Resulting in the below channel responses:
-
Blacklist Text Entries
Addingtext
type entries to theblacklist
will instead make the botkickban
the client using thecomment
as the kick reason (in this caseCoke is better
)
country#
- Add a blacklist entry for the entire country of China based on the origin of the IP address:
asn#
- Add Google's Autonomous System Number (ASN) to whitelist their entire IP space:
chan#
- Add blacklisted channel
#hackers
tokickban
members with reasonHackers not allowed
- Add any channel with
hack
in its name to blacklist, with the same reason: -
White Listing Channels
Because whitelists are always checked before blacklists, it is not recommended to use whitelisted channels that the bot is not also in.This is because doing so would necessitate a
/WHOIS
before blacklist entries can be matched, thereby slowing down blacklist matching for other entry types (especially forhost
,regex
, anduser
where the user is usermode +x on Undernet).
last#
- Add the last 3 clients that joined the channel to the
blacklist
withhost
entry type and defaultreason
:@Empus | y add black last 3 @yolk | added host whitelist entry (id: 81 -- value: 74.125.68.27 -- action: kickban -- reason: abuse) @yolk | added host whitelist entry (id: 82 -- value: 172.253.118.26 -- action: kickban -- reason: abuse) @yolk | added host whitelist entry (id: 83 -- value: 74.125.68.26 -- action: kickban -- reason: abuse)
-
Host Tracking
The bot will remember recently joined hosts within the lastN
seconds for a channel, set by configuration variablelasthosts
dronebl#
- Add IP to DroneBL:
-
DroneBL
Adding entries to DroneBL requires configuration and an RPC2 key obtained from DroneBL.
Shortcuts#
Command shortcuts are supported for faster entry management. To use shortcuts, use the first letter
of the list type
, method
, and action
@Empus | y a w u Empus o My master!
@yolk | added user whitelist entry (id: 67 -- value: Empus -- action: op -- reason: My master!)
@Empus | y add white user Empus op My master!
@yolk | added user whitelist entry (id: 67 -- value: Empus -- action: op -- reason: My master!)
@Empus | y a b u MrBob
@yolk | added user blacklist entry (id: 80 -- value: MrBob -- action: kickban -- reason: abuse)
@Empus | y add black user MrBob,MsJane troublesome
@yolk | added user blacklist entry (id: 89 -- value: MrBob -- action: kickban -- reason: troublesome)
@yolk | added user blacklist entry (id: 90 -- value: MsJane -- action: kickban -- reason: troublesome)
Related Commands#
Command | Description |
---|---|
cmds | List available commands |
help | View the help for a given command |
chanscan | Scans the entire channel and acts upon matches |
mod | Modifies the settings of a list entry |
rem | Remove a list entry |
search | Search for whitelist & blacklist entries |
scan | Scan a client or value against lists and return results |
view | View an existing list entry |