Skip to content
PantherMan594 edited this page Feb 2, 2015 · 10 revisions

Levenshtein Distance

As of version 1.0.6, BungeeEssentials implements a very basic antispam feature which calculates the levenshtein distance of the current message and previous message, this helps to prevent spam as messages that are considered to be an 85% match or higher will be blocked and the player will be presented a message asking them not to spam.

Unfortunately this makes mass messaging a pain, though it is a trade off for having the functionality there. You can bypass the filter by granting yourself the appropriate permission from the permissions page.

You can disable this feature by removing spam from your enable list. Find out more on the modules page.

Regular Expressions

As of version 1.0.6, BungeeEssentials implements a basic regex matching system where you can setup "rules" (inspired by the likes of ChatControl and PwnFilter) to determine if a message should be blocked or not.

You can also bypass this filter by granting the appropriate permission from the permissions page.

You can disable this feature by removing rules from your enable list. Find out more on the modules page.


By default BungeeEssentials includes several expressions, though these are mainly for demonstration purposes and I can't promise that they are amazingly reliable (I'm not an expression god, sorry!)

rules:
    - pattern: '\bfuck\b'
      handle: CURSING
    - pattern: '^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$'
      handle: ADVERTISEMENT
    - pattern: '(?:(?:2(?:[0-4][0-9]|5[0-5])|[0-1]?[0-9]?[0-9])\.){3}(?:(?:2([0-4][0-9]|5[0-5])|[0-1]?[0-9]?[0-9]))'
      handle: ADVERTISEMENT
    - pattern: 'asshole'
      handle: REPLACE
      replacement: '******'

For those of you who do not understand regular expressions, the middle two rules block hyperlinks and attempts to also block IPv4 addresses.

Handlers

There are 3 handlers available as of version 1.0.6, they are listed below:

  • ADVERTISEMENT
  • CURSING
  • REPLACE

Replacement offers you the ability to replace the matched text with text of your choice, you can see an example of this above.

The ADVERTISEMENT handler will warn a player with whatever you have specified in the configuration file and the CURSING handler will also warn the player with whatever you have specified in the configuration file.

Warnings

By default the configuration file comes loaded with three warnings as displayed below, these can be adjusted as you wish and global variables may be used should you wish to use them.

warnings:
    similarity: '&cPlease do not spam other players!'
    swearing: '&cPlease do not swear at other players!'
    advertising: '&cPlease do not advertise other servers!'

Logging

A chat logging feature to the plugin, which will log which rules a player breaks to plugins/BungeeEssentials/chat/chat.log

Clone this wiki locally