From 0df32d53c2b7600599576adb20c12ee4d50dbb5c Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Fri, 6 Aug 2010 16:45:11 -0400 Subject: Change irc::modestacker output in FORMAT_PERSIST to always use long modes --- src/mode.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/mode.cpp') 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(); -- cgit v1.3.1-10-gc9f91