diff options
| author | 2010-08-06 16:45:11 -0400 | |
|---|---|---|
| committer | 2010-08-06 16:45:11 -0400 | |
| commit | 0df32d53c2b7600599576adb20c12ee4d50dbb5c (patch) | |
| tree | e34af417c97809a26ec8d3283c3b11a6a5b27ed4 /src/mode.cpp | |
| parent | Fix DelMode failing on modes using the default ParamChannelModeHandler::OnMod... (diff) | |
Change irc::modestacker output in FORMAT_PERSIST to always use long modes
Diffstat (limited to 'src/mode.cpp')
| -rw-r--r-- | src/mode.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index 448c4e358..4dee4938c 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -272,7 +272,7 @@ std::string irc::modestacker::popModeLine(SerializeFormat format, int maxlen, in continue; } - if (!modechar) + if (format == FORMAT_PERSIST || !modechar) { // this will only happen if we already allowed NameOnlyModes, no need to check modechar = 'Z'; @@ -305,6 +305,14 @@ std::string irc::modestacker::popModeLine(SerializeFormat format, int maxlen, in line_full: sequence.erase(sequence.begin(), iter); + if (format == FORMAT_PERSIST) + { + std::string rv = params.str(); + if (rv.empty()) + return rv; + // drop the initial space + return rv.substr(1); + } if (modeline.empty()) return "+"; return modeline + params.str(); |
