aboutsummaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-07-03 15:46:57 +0100
committerGravatar Sadie Powell2021-07-03 15:47:16 +0100
commited62a398219f831a47822a7e67d5d54e42f3dce5 (patch)
tree43fb8b6591e8e22888c1e68a1442c66a96b10c85 /src/mode.cpp
parentMove ModeParser::GiveModeList to core_mode. (diff)
Move ModeParser::BuildPrefixes to core_mode.
Now we've dropped support for the 1202 protocol we don't need this in the core.
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 089670869..ab5b2f8e6 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -724,36 +724,6 @@ PrefixMode* ModeParser::FindPrefix(unsigned const char pfxletter)
return NULL;
}
-struct PrefixModeSorter
-{
- bool operator()(PrefixMode* lhs, PrefixMode* rhs)
- {
- return lhs->GetPrefixRank() < rhs->GetPrefixRank();
- }
-};
-
-std::string ModeParser::BuildPrefixes(bool lettersAndModes)
-{
- std::string mletters;
- std::string mprefixes;
- std::vector<PrefixMode*> prefixes;
-
- for (const auto& pm : GetPrefixModes())
- {
- if (pm->GetPrefix())
- prefixes.push_back(pm);
- }
-
- std::sort(prefixes.begin(), prefixes.end(), PrefixModeSorter());
- for (std::vector<PrefixMode*>::const_reverse_iterator n = prefixes.rbegin(); n != prefixes.rend(); ++n)
- {
- mletters += (*n)->GetPrefix();
- mprefixes += (*n)->GetModeChar();
- }
-
- return lettersAndModes ? "(" + mprefixes + ")" + mletters : mletters;
-}
-
void ModeParser::AddModeWatcher(ModeWatcher* mw)
{
modewatchermap.emplace(mw->GetModeName(), mw);