diff options
| author | 2026-03-14 02:15:38 +0000 | |
|---|---|---|
| committer | 2026-03-14 03:09:11 +0000 | |
| commit | 76f3f24c03c22576324e5af199d3e61d02a79b0d (patch) | |
| tree | efa6b9a0295e7b99dc8c0c47c8dd6030238c8cac /modules/alias.cpp | |
| parent | Convert some methods to use string_view. (diff) | |
Rewrite sepstream and move to stringutils.
Diffstat (limited to 'modules/alias.cpp')
| -rw-r--r-- | modules/alias.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/modules/alias.cpp b/modules/alias.cpp index 75dbc8c87..85d16f2f3 100644 --- a/modules/alias.cpp +++ b/modules/alias.cpp @@ -121,7 +121,7 @@ public: static std::string GetVar(std::string varname, const std::string& original_line) { - irc::spacesepstream ss(original_line); + StringSplitter ss(original_line); varname.erase(varname.begin()); int index = *(varname.begin()) - 48; varname.erase(varname.begin()); @@ -227,7 +227,7 @@ public: std::string scommand; // text is like "!moo cows bite me", we want "!moo" first - irc::spacesepstream ss(details.text); + StringSplitter ss(details.text); ss.GetToken(scommand); if (scommand.size() <= fprefix.size()) @@ -309,12 +309,9 @@ public: } else { - irc::sepstream commands(a.ReplaceFormat, '\n'); - std::string scommand; - while (commands.GetToken(scommand)) - { + StringSplitter commands(a.ReplaceFormat, '\n'); + for (std::string scommand; commands.GetToken(scommand); ) DoCommand(scommand, user, c, safe, a); - } return 1; } } |
