aboutsummaryrefslogtreecommitdiff
path: root/modules/messageflood.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2026-03-14 02:15:38 +0000
committerGravatar Sadie Powell2026-03-14 03:09:11 +0000
commit76f3f24c03c22576324e5af199d3e61d02a79b0d (patch)
treeefa6b9a0295e7b99dc8c0c47c8dd6030238c8cac /modules/messageflood.cpp
parentConvert some methods to use string_view. (diff)
Rewrite sepstream and move to stringutils.
Diffstat (limited to 'modules/messageflood.cpp')
-rw-r--r--modules/messageflood.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/messageflood.cpp b/modules/messageflood.cpp
index 24d9a6917..622501d4e 100644
--- a/modules/messageflood.cpp
+++ b/modules/messageflood.cpp
@@ -108,9 +108,9 @@ class MsgFlood final
: public ParamMode<MsgFlood, SimpleExtItem<MsgFloodSettings>>
{
private:
- static bool ParseAction(irc::sepstream& stream, MsgFloodAction& action)
+ static bool ParseAction(StringSplitter& stream, MsgFloodAction& action)
{
- std::string actionstr;
+ std::string_view actionstr;
if (!stream.GetToken(actionstr))
return false;
@@ -130,9 +130,9 @@ private:
return true;
}
- static bool ParseMessages(irc::sepstream& stream, unsigned int& messages)
+ static bool ParseMessages(StringSplitter& stream, unsigned int& messages)
{
- std::string messagestr;
+ std::string_view messagestr;
if (!stream.GetToken(messagestr))
return false;
@@ -140,9 +140,9 @@ private:
return true;
}
- static bool ParsePeriod(irc::sepstream& stream, unsigned long& period)
+ static bool ParsePeriod(StringSplitter& stream, unsigned long& period)
{
- std::string periodstr;
+ std::string_view periodstr;
if (!stream.GetToken(periodstr))
return false;
@@ -162,7 +162,7 @@ public:
unsigned int messages;
unsigned long period;
- irc::sepstream stream(parameter, ':');
+ StringSplitter stream(parameter, ':');
if (!ParseAction(stream, action) || !ParseMessages(stream, messages) || !ParsePeriod(stream, period))
{
source->WriteNumeric(Numerics::InvalidModeParameter(channel, this, parameter));