summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2018-08-22 13:43:46 +0100
committerPeter Powell <petpow@saberuk.com>2018-08-22 21:25:55 +0100
commitb5bc17fba34044097844263641c0f612db75d466 (patch)
tree342ae94f13a302963003fd4821bff2afccd21c42 /src/mode.cpp
parentbc4751a3279b3c058b2f0c5af5fdebbab10474d3 (diff)
Send the 001-004 numerics and MOTD/LUSERS from core_info.
Co-authored-by: Attila Molnar <attilamolnar@hush.com>
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 71fce24d8..0bb97cc9e 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -630,8 +630,6 @@ void ModeParser::AddMode(ModeHandler* mh)
mhlist.prefix.push_back(pm);
else if (mh->IsListModeBase())
mhlist.list.push_back(mh->IsListModeBase());
-
- RecreateModeListFor004Numeric();
}
bool ModeParser::DelMode(ModeHandler* mh)
@@ -689,8 +687,6 @@ bool ModeParser::DelMode(ModeHandler* mh)
mhlist.prefix.erase(std::find(mhlist.prefix.begin(), mhlist.prefix.end(), mh->IsPrefixMode()));
else if (mh->IsListModeBase())
mhlist.list.erase(std::find(mhlist.list.begin(), mhlist.list.end(), mh->IsListModeBase()));
-
- RecreateModeListFor004Numeric();
return true;
}
@@ -720,27 +716,6 @@ PrefixMode* ModeParser::FindPrefixMode(unsigned char modeletter)
return mh->IsPrefixMode();
}
-std::string ModeParser::CreateModeList(ModeType mt, bool needparam)
-{
- std::string modestr;
-
- for (unsigned char mode = 'A'; mode <= 'z'; mode++)
- {
- ModeHandler* mh = modehandlers[mt][mode-65];
- if ((mh) && ((!needparam) || (mh->NeedsParam(true))))
- modestr.push_back(mode);
- }
-
- return modestr;
-}
-
-void ModeParser::RecreateModeListFor004Numeric()
-{
- Cached004ModeList[0] = CreateModeList(MODETYPE_USER);
- Cached004ModeList[1] = CreateModeList(MODETYPE_CHANNEL);
- Cached004ModeList[2] = CreateModeList(MODETYPE_CHANNEL, true);
-}
-
PrefixMode* ModeParser::FindPrefix(unsigned const char pfxletter)
{
const PrefixModeList& list = GetPrefixModes();