aboutsummaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-07-03 15:26:47 +0100
committerGravatar Sadie Powell2021-07-03 15:26:47 +0100
commitc78d21d00bb6070d514b7a9a7be7e52dd59da411 (patch)
tree9fc45172c847cfe6de51472afaaf80b6001a4fad /src/mode.cpp
parentWe haven't used Travis CI in a long time so this is unnecessary. (diff)
Move ModeParser::GiveModeList 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.cpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 66c520d4a..089670869 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -724,54 +724,6 @@ PrefixMode* ModeParser::FindPrefix(unsigned const char pfxletter)
return NULL;
}
-std::string ModeParser::GiveModeList(ModeType mt)
-{
- std::string type1; /* Listmodes EXCEPT those with a prefix */
- std::string type2; /* Modes that take a param when adding or removing */
- std::string type3; /* Modes that only take a param when adding */
- std::string type4; /* Modes that dont take a param */
-
- for (unsigned char mode = 'A'; mode <= 'z'; mode++)
- {
- ModeHandler* mh = modehandlers[mt][mode-65];
- if (mh)
- {
- /* One parameter when adding */
- if (mh->NeedsParam(true))
- {
- PrefixMode* pm = mh->IsPrefixMode();
- if ((mh->IsListMode()) && ((!pm) || (pm->GetPrefix() == 0)))
- {
- type1 += mh->GetModeChar();
- }
- else
- {
- /* ... and one parameter when removing */
- if (mh->NeedsParam(false))
- {
- /* But not a list mode */
- if (!pm)
- {
- type2 += mh->GetModeChar();
- }
- }
- else
- {
- /* No parameters when removing */
- type3 += mh->GetModeChar();
- }
- }
- }
- else
- {
- type4 += mh->GetModeChar();
- }
- }
- }
-
- return type1 + "," + type2 + "," + type3 + "," + type4;
-}
-
struct PrefixModeSorter
{
bool operator()(PrefixMode* lhs, PrefixMode* rhs)