aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_repeat.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-01-18 10:30:22 +0000
committerGravatar Sadie Powell2021-01-18 11:42:25 +0000
commitdb0052bcc23f8c8bc5d152d7ebbdda492b56cc4c (patch)
treea18c79a7453fc41665b43e3e77f47f164834e2b4 /src/modules/m_repeat.cpp
parentMerge branch 'insp3' into master. (diff)
parentAdd a separate stats class for DNSBL errors. (diff)
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules/m_repeat.cpp')
-rw-r--r--src/modules/m_repeat.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/modules/m_repeat.cpp b/src/modules/m_repeat.cpp
index 3bb1e9bff..3b79890db 100644
--- a/src/modules/m_repeat.cpp
+++ b/src/modules/m_repeat.cpp
@@ -89,6 +89,8 @@ class RepeatMode : public ParamMode<RepeatMode, SimpleExtItem<ChannelSettings> >
unsigned int MaxBacklog = 0;
unsigned int MaxDiff = 0;
unsigned int MaxMessageSize = 0;
+ std::string KickMessage;
+
};
std::vector<unsigned int> mx[2];
@@ -249,6 +251,8 @@ class RepeatMode : public ParamMode<RepeatMode, SimpleExtItem<ChannelSettings> >
if (newsize > ServerInstance->Config->Limits.MaxLine)
newsize = ServerInstance->Config->Limits.MaxLine;
Resize(newsize);
+
+ ms.KickMessage = conf->getString("kickmessage", "Repeat flood");
}
std::string GetModuleSettings() const
@@ -256,6 +260,11 @@ class RepeatMode : public ParamMode<RepeatMode, SimpleExtItem<ChannelSettings> >
return ConvToStr(ms.MaxLines) + ":" + ConvToStr(ms.MaxSecs) + ":" + ConvToStr(ms.MaxDiff) + ":" + ConvToStr(ms.MaxBacklog);
}
+ std::string GetKickMessage() const
+ {
+ return ms.KickMessage;
+ }
+
void SerializeParam(Channel* chan, const ChannelSettings* chset, std::string& out)
{
chset->serialize(out);
@@ -401,7 +410,7 @@ class RepeatModule : public Module
ServerInstance->Modes.Process(ServerInstance->FakeClient, chan, NULL, changelist);
}
- memb->chan->KickUser(ServerInstance->FakeClient, user, "Repeat flood");
+ memb->chan->KickUser(ServerInstance->FakeClient, user, rm.GetKickMessage());
return MOD_RES_DENY;
}
return MOD_RES_PASSTHRU;