diff options
| author | 2024-08-27 14:29:56 +0100 | |
|---|---|---|
| committer | 2024-08-27 14:29:56 +0100 | |
| commit | e6ea9f7d4a4bf015524749da6ffeecf1d15c9268 (patch) | |
| tree | 1a46e36ddd8c5bedc35a1fddd37c3c169714cbdf /src/helperfuncs.cpp | |
| parent | Fix a minor doxygen warning. (diff) | |
Change InspIRCd::ProcessColors to take a string instead of a vector.
This is more useful for how MOTDs are processed now as we iterate
through them anyway and this allows us to avoid a needless second
iteration.
Diffstat (limited to 'src/helperfuncs.cpp')
| -rw-r--r-- | src/helperfuncs.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index bd8f4a231..5ebb6e44d 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -121,6 +121,12 @@ void InspIRCd::StripColor(std::string& sentence) void InspIRCd::ProcessColors(std::vector<std::string>& input) { + for (auto& line : input) + ProcessColors(line); +} + +void InspIRCd::ProcessColors(std::string& ret) +{ /* * Replace all color codes from the special[] array to actual * color code chars using C++ style escape sequences. You @@ -148,7 +154,6 @@ void InspIRCd::ProcessColors(std::vector<std::string>& input) special_chars("", "") }; - for (auto& ret : input) { for(int i = 0; !special[i].character.empty(); ++i) { |
