diff options
| author | Adam <Adam@anope.org> | 2011-03-07 19:54:51 -0500 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2011-03-07 19:54:51 -0500 |
| commit | 8eb23e7d489239e8af79c2d6da587cd1c3a81b5d (patch) | |
| tree | 04bf54ceb46a4b18345cf4e01d8aeb11ccd52c07 /modules/protocol/inspircd-ts6.h | |
| parent | 093b3d258e7b14d2aa057ca6113de034b5063efe (diff) | |
Added support for extbans
Diffstat (limited to 'modules/protocol/inspircd-ts6.h')
| -rw-r--r-- | modules/protocol/inspircd-ts6.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/protocol/inspircd-ts6.h b/modules/protocol/inspircd-ts6.h index 952268184..dda07f5a2 100644 --- a/modules/protocol/inspircd-ts6.h +++ b/modules/protocol/inspircd-ts6.h @@ -9,6 +9,25 @@ * Based on the original code of Services by Andy Church. */ +class ChannelModeFlood : public ChannelModeParam +{ + public: + ChannelModeFlood(char modeChar, bool minusNoArg) : ChannelModeParam(CMODE_FLOOD, modeChar, minusNoArg) { } + + bool IsValid(const Anope::string &value) const + { + try + { + Anope::string rest; + if (!value.empty() && value[0] != ':' && convertTo<int>(value[0] == '*' ? value.substr(1) : value, rest, false) > 0 && rest[0] == ':' && rest.length() > 1 && convertTo<int>(rest.substr(1), rest, false) > 0 && rest.empty()) + return true; + } + catch (const ConvertException &) { } + + return false; + } +}; + class InspIRCdTS6Proto : public IRCDProto { private: |
