Skip to content

chatcontrol.yml

Oliver Martin edited this page May 1, 2020 · 7 revisions
############################################################
# +------------------------------------------------------+ #
# |                      MultiChat                       | #
# +------------------------------------------------------+ #
############################################################

# By Revilo410

##################
#   DON'T EDIT   #
version: "1.9"   #
##################

Plugin version, do not edit or it will break your plugin!


# 1. Chat Control Rules
# 2. Mute and Ignore Settings

############################################################
# +------------------------------------------------------+ #
# |                  Chat Control Rules                  | #
# +------------------------------------------------------+ #
############################################################

# These are custom regular expression rules to alter messages sent through the chat.
# The regular expression in "look_for", is replaced by the value in "replace_with".

# These can be used to filter inappropriate language from chat as well as many other things.
# Some examples are shown below...

regex_rules:
# Example rule to replace [bold] with the format code %l to make bold text
- look_for: '\[bold\]'
  replace_with: "&l"
  permission: "multichat.regexrules.bold" # You can choose to specify permissions in order for the regex rules to apply
# Example rule to replace [italic] with the format code %o to make italic text
- look_for: '\[italic\]'
  replace_with: "&o"

apply_rules_to:
  global_chat: true
  private_messages: false
  group_chats: false
  staff_chats: false
  display_command: false
  announcements: false
  bulletins: false
  casts: false
  helpme: false

This section allows you to perform "find and replace" operations on the chat messages sent. These are powered by "regular expressions" (regex). If you do not know what regex is, then just search for it online. There are lots of resources available. By specifying a regular expression you can "match" certain expressions in the chat. The "replace with" part will then place the matched expressions. All the occurences of the expression matched by the regex will be replaced.

You can specify a permission that means the rules will only apply to players with that permission. If you start the permission with an exclamation mark, like "!multichat.some.permission", then the rule will only apply to players WITHOUT that permission.

You can also configure which chats these rules will be applied to. By default they only apply to global chat.

These rules can be used to filter out inappropriate language, correct common spelling mistakes, or anything you can image!


# These are custom regular expression triggered actions.
# The regular expression in "look_for", triggers the command in "command"
# You can choose to cancel the players chat event by setting "cancel" to true
# Setting "spigot" to true will send the command to the local spigot server the
# player is currently on and execute it there instead of on bungeecord.

# These can be used to filter inappropriate language from chat as well as many other things.
# Some examples are shown below...

# You can use %PLAYER% to refer to the player sending the message

regex_actions:
# Example rule to kick someone who says a specific phrase
- look_for: 'kickmeplzrightnow'
  command: "kick %PLAYER% You asked for it!"
  cancel: false
  spigot: true
- look_for: 'thisisabadword'
  command: "kick %PLAYER% You are now allowed to say that here!"
  permission: "!multichat.chat.badwords" # If the permission starts with !, then the action will only apply to players WITHOUT that permission.
  cancel: true
  spigot: true

apply_actions_to:
  global_chat: true
  private_messages: false
  group_chats: false
  staff_chats: false
  helpme: false

This section is similar to the one above, however, it instead allows you to perform commands when a regular expression is matched. (If you do not know what regex is, then just search for it online. There are lots of resources available.) The command config option lets you specify a command to run from the console whenever the sent chat message matches the regex. (NOTE: The regular expression must match the WHOLE chat message sent, unlike the section above where all occurences were replaced). You can use the %PLAYER% placeholder to represent the username of the player who sent the message.

The cancel option determines if the matched chat message should be shown or not. You might want to ban all players saying a bad word, in which case you'd want to cancel the chat message before its shown. The spigot option determines if the command should be run on the local server the player is on, rather than on bungeecord. If you want to use a command from a spigot plugin then set this true, if you want to use a command registered on bungeecord (like a MultiChat one) then set this to false.

You can specify a permission that means the rules will only apply to players with that permission. If you start the permission with an exclamation mark, like "!multichat.some.permission", then the rule will only apply to players WITHOUT that permission.

You can also configure which chats these rules will be applied to. By default they only apply to global chat.


############################################################
# +------------------------------------------------------+ #
# |                  Anti-Spam Settings                  | #
# +------------------------------------------------------+ #
############################################################

# Should MultiChat Anti-Spam be enabled

anti_spam: true

Should the "anti-spam" feature of MultiChat be enabled?


#################
# Timer Trigger #
#################

# If a player sends 4 messages in this many seconds then anti-spam will be triggered
anti_spam_time: 4

If the player sends 4 messages in this many seconds then the anti-spam feature will trigger to block the players chat for a set time period. If this number is longer then the anti-spam is more likely to trigger. (As players sending 4 messages over 10 seconds is probably not unrealistic). But if a player sends 4 messages within a second then it is probably spam!


########################
# Same Message Trigger #
########################

# Sending the same message this many times in a row will also trigger anti-spam
spam_same_message: 4

This setting lets you decide another way to trigger the anti-spam. If a player sends the exact same message this many times in a row then they will also be blocked from sending messages for a certain time period.

(There is a special part of code that says the following: "if it has been longer than 10 times the usual spam time then this should not be considered spam. And hence the counter is reset". This means that if the player waits 10 times the spam time specified in the previous config option before sending the same message again, then it will not be considered spam anymore)


#####################
# Anti-Spam Actions #
#####################

# How many seconds must a player wait before sending a message once they trigger anti-spam?
anti_spam_cooldown: 60

If anti-spam is triggered, then the player has to wait this many seconds before they can send a message again.


# Should a command be triggered if anti-spam activates a certain amount of times for the same player?
anti_spam_action: true

This setting determines if a command should ever be executed as a result of anti-spam triggering.


# Should this command be executed on spigot (as opposed to bungeecord)
anti_spam_spigot: true

This setting determines if the command should be run by the console on your local spigot server, instead of being executed on bungeecord. (If you are running a command from a plugin like Essentials, use spigot, if you want to run a multichat command, use bungeecord)


# How many times must anti-spam be triggered before sending the command?
anti_spam_trigger: 3

This setting lets you decide how many times in a row the player should have triggered anti-spam before the command is run.


# What command should be sent? (%PLAYER% is the player who triggered the anti-spam)
anti_spam_command: "kick %PLAYER% Spamming is not allowed"

Determines the command that should be run when the anti-spam is triggered the amount of times specified above.


# In what types of chat should anti_spam be enforced?
apply_anti_spam_to:
  global_chat: true
  private_messages: true
  group_chats: true
  helpme: true

Lets you specify what chats anti-spam should apply to


############################################################
# +------------------------------------------------------+ #
# |               Mute and Ignore Settings               | #
# +------------------------------------------------------+ #
############################################################

################
# Mute Command #
################

# Use MultiChat mute command?
# Set to false if you have another BUNGEECORD plugin which deals with muting

mute: false

Enabling this will turn on MultiChat's own mute command. Ideally this should be handled by a dedicated player banning plugin.


# In what types of chat should mute be enforced?

apply_mute_to:
  global_chat: true
  private_messages: false
  group_chats: false
  helpme: false

What chats should the player be blocked from using if they are muted? (Using the multichat mute command)


# Mute command aliases (in addition to /multichatmute)

mutecommand:
- mute
- mcmute

Here you can specify command aliases for the mute command. Useful if it conflicts with other plugins.


##################
# Ignore Command #
##################

# MultiChat ignore command to stop seeing messages from specific players

# Should a notification be sent to players if a player they ignore sent a message?

notify_ignore: false

Should players see a 'placeholder' message when a person they ignore talks in chat?


# Session ignore (Should /ignore only last until you log out?)
# WARNING: Enabling sessional ignore will (obviously) delete stored ignore data of offline players

session_ignore: false

If this is set to true, then the ignore command will only last until the player logs out.


# In what types of chat should ignore be enforced?

apply_ignore_to:
  global_chat: true
  private_messages: true
  group_chats: false

Allows you to decide what chats ignore should block messages in.


# Ignore command aliases (in addition to /ignore)

ignorecommand:
- blockchat

Allows you to specify other command aliases for the ignore command. Useful if there are conflicts with other plugins.


############################################################
# +------------------------------------------------------+ #
# |                  Link / URL Controls                 | #
# +------------------------------------------------------+ #
############################################################

# Should MultiChat control which players can send links to chat?
# If set to true, then only players with multichat.chat.link will be able to send links
link_control: false
link_regex: '((https|http):\/\/)?(www\.)?([-a-zA-Z0-9@:%._\+~#=]{2,256}\.)+[a-zA-Z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)'

# Message to replace links in chat with
link_removal_message: "[LINK REMOVED]"

These settings allow you to control who can send links in chat. If "link_control" is set to true, then only players with the permission multichat.chat.link will be able to send links in chat. If a player without permission tries to send a link, then it will be replaced with the message in "link_removal_message".