/*
* InspIRCd -- Internet Relay Chat Daemon
*
+ * Copyright (C) 2021 iwalkalone <iwalkalone69@gmail.com>
+ * Copyright (C) 2019 Robby <robby@chatbelgie.be>
+ * Copyright (C) 2018-2019 linuxdaemon <linuxdaemon.irc@gmail.com>
+ * Copyright (C) 2018 Matt Schatz <genius3000@g3k.solutions>
+ * Copyright (C) 2017-2019 Sadie Powell <sadie@witchery.services>
+ * Copyright (C) 2015 James Lu <GLolol@overdrivenetworks.com>
+ * Copyright (C) 2013-2015 Attila Molnar <attilamolnar@hush.com>
* Copyright (C) 2013 Daniel Vassdal <shutter@canternet.org>
*
* This file is part of InspIRCd. InspIRCd is free software: you can
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;
Version GetVersion() CXX11_OVERRIDE
{
- return Version("Provides channel mode +E, blocking of similar messages", VF_COMMON|VF_VENDOR, rm.GetModuleSettings());
+ return Version("Adds channel mode E (repeat) which helps protect against spammers which spam the same message repeatedly.", VF_COMMON|VF_VENDOR, rm.GetModuleSettings());
}
};