Command: add#
Summary#
| Command | Default Level | Global Only? |
|---|---|---|
| add | 200 | no |
Description#
- Adds an entry to the
whitelistorblacklist - Clients joining channel will be scanned against lists when
modeisonorsecure
-
Secure Mode
Thesecuremode is only available on networks usingircu, such as Undernet or Quakenet.When in
securemode, a channel will be set to+Dmto moderate the channel and delay the join or new users.All current users will be voiced, and a periodic timer will use
/names -dto 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)hostorip: host or IPrname: realname field of clientregex: regular expression using formatnick!user@host/realnametext: text match, whereby forwhitelistentries to make the bot responds withcommentand forblacklistentries the bot kickbans the client usingreasonas 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/whoisresponse)last: lastNusers 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 forblacklistentries)
- Allow
reasonto be optional, using configuration default for blacklist entries - Allow cumulative matching to allow act when a minimum of
joinsclients join the channel withinsecsseconds. Once matched, hold the matching window open for a further optionalholdseconds, 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
Empustowhitelistand automaticallyopwhen joining channels, using thereasonofMy master!: - Add all clients to the
blacklistthat have a network accountuserwithhackin 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
useris only available for networks that useircusuch as Undernet or Quakenet.
host#
- Add IP
10.0.0.1towhitelisttoacceptclients, using thereasonoflocal machine: - Add subnet
142.250.204.160/27towhitelistand accept clients usingMrBob's VPS: - Add user@host mask with CIDR notation to
blacklist: - Add hostmask
*!mrbob@*.isp.comto blacklist tokickbanclients, using thereasonofabusive user -
Actions
Blacklist entries will acceptban,b,kb,kickban, andkas all resulting inkickbanas the resulting action when a client matches the entry.Whitelist entries will accept:
acceptorato accept a clientoporoto op a clientvoiceorvto voice a client
Action will default to
acceptforwhitelistentries andkickbanfor blacklist entries. Meaning, this field is optional and the below can also be used:
rname#
- Add realname
'Mr Bob'toblacklisttokickbanclients, 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
kickbanclients 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
kickbanclients with unresolved idents when3or more join within2seconds, usingfloodbotas the reason: -
Same as above, but this time after a positive match, immediately match other clients within a
10second window, extending by that same 10 seconds for each subsequent match: -
Limits
Cumulative limits in the form of
joins:secs:holdcan be used on anyhostorregexentries 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 betterwhen any client sayspepsi: - Resulting in the below channel responses:
-
Blacklist Text Entries
Addingtexttype entries to theblacklistwill instead make the botkickbanthe client using thecommentas 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
#hackerstokickbanmembers with reasonHackers not allowed - Add any channel with
hackin 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
/WHOISbefore blacklist entries can be matched, thereby slowing down blacklist matching for other entry types (especially forhost,regex, anduserwhere the user is usermode +x on Undernet).
last#
- Add the last 3 clients that joined the channel to the
blacklistwithhostentry 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 lastNseconds 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 |