diff options
| author | 2026-03-14 02:15:38 +0000 | |
|---|---|---|
| committer | 2026-03-14 03:09:11 +0000 | |
| commit | 76f3f24c03c22576324e5af199d3e61d02a79b0d (patch) | |
| tree | efa6b9a0295e7b99dc8c0c47c8dd6030238c8cac /modules/anticaps.cpp | |
| parent | Convert some methods to use string_view. (diff) | |
Rewrite sepstream and move to stringutils.
Diffstat (limited to 'modules/anticaps.cpp')
| -rw-r--r-- | modules/anticaps.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/anticaps.cpp b/modules/anticaps.cpp index 0d9a5482f..fa661a66e 100644 --- a/modules/anticaps.cpp +++ b/modules/anticaps.cpp @@ -48,14 +48,14 @@ public: { } - static bool Parse(irc::sepstream& stream, AntiCapsMethod& method, uint16_t& minlen, uint8_t& percent) + static bool Parse(StringSplitter& stream, AntiCapsMethod& method, uint16_t& minlen, uint8_t& percent) { return ParseMethod(stream, method) && ParseMinimumLength(stream, minlen) && ParsePercent(stream, percent); } - static bool ParseMethod(irc::sepstream& stream, AntiCapsMethod& method) + static bool ParseMethod(StringSplitter& stream, AntiCapsMethod& method) { - std::string methodstr; + std::string_view methodstr; if (!stream.GetToken(methodstr)) return false; @@ -75,9 +75,9 @@ public: return true; } - static bool ParseMinimumLength(irc::sepstream& stream, uint16_t& minlen) + static bool ParseMinimumLength(StringSplitter& stream, uint16_t& minlen) { - std::string minlenstr; + std::string_view minlenstr; if (!stream.GetToken(minlenstr)) return false; @@ -89,9 +89,9 @@ public: return true; } - static bool ParsePercent(irc::sepstream& stream, uint8_t& percent) + static bool ParsePercent(StringSplitter& stream, uint8_t& percent) { - std::string percentstr; + std::string_view percentstr; if (!stream.GetToken(percentstr)) return false; @@ -116,7 +116,7 @@ public: bool OnSet(User* source, Channel* channel, std::string& parameter) override { - irc::sepstream stream(parameter, ':'); + StringSplitter stream(parameter, ':'); AntiCapsMethod method; uint16_t minlen; uint8_t percent; |
