Make the messageflood and repeat messages a bit better.

This commit is contained in:
Sadie Powell 2024-09-28 16:05:40 +01:00
parent 51824113f0
commit 88c28f5256
3 changed files with 4 additions and 4 deletions

View File

@ -1631,7 +1631,7 @@
# 1/5 of a NOTICE or PRIVMSG to avoid users being accidentally flooded # 1/5 of a NOTICE or PRIVMSG to avoid users being accidentally flooded
# out of a channel by automatic client features such as typing # out of a channel by automatic client features such as typing
# notifications. # notifications.
#<messageflood message="Message flood (trigger is %messages% messages in %duration%)" #<messageflood message="Message flood detected (trigger is %messages% messages in %duration%)"
# extended="yes" # extended="yes"
# notice="1.0" # notice="1.0"
# privmsg="1.0" # privmsg="1.0"
@ -2076,7 +2076,7 @@
# maxtime="0s" # maxtime="0s"
# size="512" # size="512"
# extended="yes" # extended="yes"
# message="Repeat flood (trigger is %lines% messages in %duration%)"> # message="Repeat flood detected (trigger is %lines% messages in %duration%)">
#<module name="repeat"> #<module name="repeat">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#

View File

@ -265,7 +265,7 @@ public:
notice = tag->getNum<double>("notice", 1.0); notice = tag->getNum<double>("notice", 1.0);
privmsg = tag->getNum<double>("privmsg", 1.0); privmsg = tag->getNum<double>("privmsg", 1.0);
tagmsg = tag->getNum<double>("tagmsg", 0.2); tagmsg = tag->getNum<double>("tagmsg", 0.2);
message = tag->getString("message", "Message flood (trigger is %messages% messages in %duration%)", 1); message = tag->getString("message", "Message flood detected (trigger is %messages% messages in %duration%)", 1);
mf.extended = tag->getBool("extended"); mf.extended = tag->getBool("extended");
mf.SetSyntax(); mf.SetSyntax();
} }

View File

@ -442,7 +442,7 @@ public:
void ReadConfig(ConfigStatus& status) override void ReadConfig(ConfigStatus& status) override
{ {
const auto& tag = ServerInstance->Config->ConfValue("repeat"); const auto& tag = ServerInstance->Config->ConfValue("repeat");
rm.ms.Message = tag->getString("message", tag->getString("kickmessage", "Repeat flood (trigger is %lines% messages in %duration%)"), 1); rm.ms.Message = tag->getString("message", tag->getString("kickmessage", "Repeat flood detected (trigger is %lines% messages in %duration%)"), 1);
rm.ms.Extended = tag->getBool("extended"); rm.ms.Extended = tag->getBool("extended");
rm.ms.MaxBacklog = tag->getNum<unsigned long>("maxbacklog", 20); rm.ms.MaxBacklog = tag->getNum<unsigned long>("maxbacklog", 20);
rm.ms.MaxDiff = tag->getNum<unsigned int>("maxdistance", 50, 0, 100); rm.ms.MaxDiff = tag->getNum<unsigned int>("maxdistance", 50, 0, 100);