# less CPU usage. Increasing this beyond 512 doesn't have
# any effect, as the maximum length of a message on IRC
# cannot exceed that.
-#<repeat maxbacklog="20" maxdistance="50" maxlines="20" maxtime="0" size="512">
+# kickmessage - Kick message when * is specified
+#<repeat maxbacklog="20"
+# maxdistance="50"
+# maxlines="20"
+# maxtime="0s"
+# size="512"
+# kickmessage="Repeat flood">
#<module name="repeat">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
unsigned int MaxBacklog;
unsigned int MaxDiff;
unsigned int MaxMessageSize;
+ std::string KickMessage;
ModuleSettings() : MaxLines(0), MaxSecs(0), MaxBacklog(0), MaxDiff() { }
};
if (newsize > ServerInstance->Config->Limits.MaxLine)
newsize = ServerInstance->Config->Limits.MaxLine;
Resize(newsize);
+
+ ms.KickMessage = conf->getString("kickmessage", "Repeat flood");
}
std::string GetModuleSettings() const
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);
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;