X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_repeat.cpp;h=5a532389a8eef17b7ff35343afd05689589fc522;hb=dcafba95960685120b1f6d902de623ca10ed6135;hp=89f5a12916fe143dd3b402c7ee9f804426a76d1b;hpb=4a6fedd9324d87349a806c9c1d0ae6e7d3c1fd38;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_repeat.cpp b/src/modules/m_repeat.cpp index 89f5a1291..5a532389a 100644 --- a/src/modules/m_repeat.cpp +++ b/src/modules/m_repeat.cpp @@ -1,6 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * + * Copyright (C) 2021 iwalkalone * Copyright (C) 2019 Robby * Copyright (C) 2018-2019 linuxdaemon * Copyright (C) 2018 Matt Schatz @@ -90,6 +91,7 @@ class RepeatMode : public ParamMode > unsigned int MaxBacklog; unsigned int MaxDiff; unsigned int MaxMessageSize; + std::string KickMessage; ModuleSettings() : MaxLines(0), MaxSecs(0), MaxBacklog(0), MaxDiff() { } }; @@ -251,6 +253,8 @@ class RepeatMode : public ParamMode > if (newsize > ServerInstance->Config->Limits.MaxLine) newsize = ServerInstance->Config->Limits.MaxLine; Resize(newsize); + + ms.KickMessage = conf->getString("kickmessage", "Repeat flood"); } std::string GetModuleSettings() const @@ -258,6 +262,11 @@ class RepeatMode : public ParamMode > 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); @@ -402,7 +411,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;