1
0
mirror of https://github.com/anope/anope.git synced 2026-06-27 15:46:39 +02:00

Add support for the UnrealIRCd flood profile mode.

This commit is contained in:
Sadie Powell
2025-11-11 17:49:21 +00:00
parent e6fa71af9d
commit e1fe7e17d3
+20
View File
@@ -715,6 +715,23 @@ public:
}
};
class ChannelModeFloodProfile final
: public ChannelModeParam
{
public:
ChannelModeFloodProfile(char modeChar) : ChannelModeParam("FLOODPROFILE", modeChar, true) { }
bool IsValid(Anope::string &value) const override
{
return value == "very-strict"
|| value == "strict"
|| value == "normal"
|| value == "relaxed"
|| value == "very-relaxed"
|| value == "off";
}
};
class ChannelModeHistory final
: public ChannelModeParam
{
@@ -911,6 +928,9 @@ private:
case 'l':
ModeManager::AddChannelMode(new ChannelModeParam("LIMIT", mode, true));
break;
case 'F':
ModeManager::AddChannelMode(new ChannelModeFloodProfile(mode));
break;
case 'H':
ModeManager::AddChannelMode(new ChannelModeHistory(mode));
break;