Link & Ad Blocker

About this module

The Intelligent Link & Ad Blocker prevents web links & server advertising (regular server ips & numeric server ips) with optional extra sensitivity bypass detection in chat, commands, signs, anvils, and books (any check contexts can be disabled). Includes the ability to whitelist domains or all subdomains of a domain.
To bypass this module, op or the permission: "chatsentry.linkandadblocker.bypass" is required.
Ifprocess-commandsis true in config.yml, this module will filter through all commands (of players without bypass permission or op)
Ifprocess-signs is true in config.yml, this module will filter through text written on signs (of players without bypass permission or op)
Ifprocess-anvils is true in config.yml, this module will filter through items renamed in anvils (of players without bypass permission or op)
Ifprocess-books is true in config.yml, this module will filter through writing in books (of players without bypass permission or op)

Config guide

You can access the below settings in the link-and-ad-blocker.yml file within the modules folder of the plugin's root folder.
Config excerpts taken from v3.6.0 and may not be completely up-to-date with the latest changes. To see the most up-to-date file, see below:

domain-whitelist

The below list is the list of domain names (not urls) that will be ignored by the filter.
Variants with and without http://, https://, and www. will automatically be handled by the plugin; no need to add them below.
Ex. adding "google.com" will allow: https://google.com, http://google.com, www.google.com, https://www.google.com, and http://www.google.com
If you wish to whitelist all subdomains of a domain, you can do so with "*."; ex. "*.google.com" will permit all subdomains of Google ("mail.google.com", "https://maps.google.com", etc.)
Character case in the below list does not matter. Case variants are automatically checked by the plugin.
Set to "domain-whitelist: []" to have an empty list.
1
domain-whitelist:
2
- "*.yourServersWebsite.com"
3
- "*.AllSubdomainsOfThisDomainAreAllowed.com"
4
- "youtube.com"
5
- "youtu.be"
6
- "spigotmc.org"
Copied!

command-whitelist

If you have commands that you would like the filter to ignore checking, add them to the list below.
Useful if you want to disable the filters checks in commands that use permissions or use comma lists (extra sensitivity will detect them otherside), or for commands like /msg.
Make sure to only include base commands; don't add any command arguments. (spaces)
Set to "command-whitelist: []" to have an empty list.
1
command-whitelist:
2
- "/lp"
3
- "/pex"
4
- "/mangaddp"
5
- "/manuaddp"
6
- "/mangdelp"
7
- "/manudelp"
8
- "/rg"
9
- "/region"
10
- "//set"
11
- "//replace"
12
- "//overlay"
13
- "//gmask"
14
- "//fill"
Copied!

only-filter-top-level-domains

If enabled, the plugin will only block roughly 1,500 of the most widely used (TLD) domains (like .com, .net, .org, etc). Keeping this can substantially decrease false positive detections and will still effectively block advertising - however the downside is that uncommon, more suspicious links are unlikely to be detected.
Only turn this off if you want maximum protection from links of any kind
The current TLD list utilized by the plugin is Version 2021020900, Last Updated Tue Feb 9 07:07:01 2021 UTC, via https://data.iana.org/TLD/tlds-alpha-by-domain.txt
1
only-filter-top-level-domains: true
Copied!

extra-sensitive

If enabled, common exploits to bypass link / ip filters will be blocked. For example, "google,,com", "google(dot)com", "youtube {D_O_T}com", etc.
You can usually safely turn this off if you don't get a lot of advertisers or bots. Since having this on makes the filter extra sensitive, the filter will be more likely to block things when it shouldn't. Due to how this option blindly processes a lot of messages, it does not respect the domain whitelist or only-filter-top-level-domains and will apply itself to any attempted malformed links it detects.
1
extra-sensitive: true
Copied!

ignore-handles

If enabled, should social handles with periods (ex. "@some.social.handle") will be ignored. Please note turning this on allows people to bypass the filter by simply adding an "@" symbol to the start of the link/ip in question.
1
ignore-handles: false
Copied!