feat(Core/ChatHandler/Conf): Flood Control Addon Messages (#12603)

* feat(Core/ChatHandler): Flood Control Addon Messages

Original Closed PR by @Kitzunu
https://github.com/azerothcore/azerothcore-wotlk/pull/11675

Cherrypicked TC:
cherry-pick commit (TrinityCore/TrinityCore@5384fc1)
cherry-pick commit (stoneharry/TrinityCore@a0629fc)

Co-Authored-By: stoneharry 3818405+stoneharry@users.noreply.github.com
Co-Authored-By: Shauren shauren.trinity@gmail.com
Co-Authored-By: stoneharry <3818405+stoneharry@users.noreply.github.com>
Co-Authored-By: Shauren <shauren.trinity@gmail.com>
Co-Authored-By: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* update: (pr): Review Response

* update: (core): Chathandler

No reason why this case should even exist. Previous or current.  This cast is under two sided interations which will always lead to you being in a group of some sorts. there is literally zero sense having a above or equal to level 80 if statement here.

* update (cleanup): Code Style

suggestion per @Nefertumm

Co-Authored-By: Angelo Venturini <nefertum.dev@protonmail.com>

Co-authored-by: stoneharry <3818405+stoneharry@users.noreply.github.com>
Co-authored-by: Shauren <shauren.trinity@gmail.com>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
Co-authored-by: Angelo Venturini <nefertum.dev@protonmail.com>
This commit is contained in:
M'Dic
2022-08-17 10:37:34 -04:00
committed by GitHub
parent b2e449fd15
commit 8b9541873a
9 changed files with 70 additions and 32 deletions

View File

@@ -1880,9 +1880,24 @@ ChatFlood.MessageCount = 10
ChatFlood.MessageDelay = 1
#
# ChatFlood.AddonMessageCount
# Description: Chat flood protection, number of addon messages before player gets muted.
# Default: 100 - (Enabled)
# 0 - (Disabled)
ChatFlood.AddonMessageCount = 100
#
# ChatFlood.AddonMessageDelay
# Description: Time (in seconds) between addon messages to be counted into ChatFlood.AddonMessageCount.
# Default: 1
ChatFlood.AddonMessageDelay = 1
#
# ChatFlood.MuteTime
# Description: Time (in seconds) characters get muted for violating ChatFlood.MessageCount.
# Description: Time (in seconds) characters get muted for violating ChatFlood.MessageCount / ChatFlood.AddonMessageCount.
# Default: 10
ChatFlood.MuteTime = 10