aboutsummaryrefslogtreecommitdiffstats
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-06-26 17:17:41 +0100
committerGravatar Sadie Powell2022-06-26 17:34:32 +0100
commit696fd30209f25d748193c7581a29837a1f8db053 (patch)
treea1275be1bfa8b3c1231d5506c36aacb799ecd9aa /src/configreader.cpp
parentMake dynamic a non-default header. (diff)
Move config xline reading and rehashing to core_xline.
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 4faaa2ab7..176a1d6c6 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -41,7 +41,6 @@
#include "inspircd.h"
#include "configparser.h"
#include "exitcodes.h"
-#include "xline.h"
ServerLimits::ServerLimits(std::shared_ptr<ConfigTag> tag)
: MaxLine(tag->getUInt("maxline", 512, 512))
@@ -92,30 +91,6 @@ ServerConfig::ServerConfig()
{
}
-static void ReadXLine(ServerConfig* conf, const std::string& tag, const std::string& key, XLineFactory* make)
-{
- insp::flat_set<std::string> configlines;
-
- for (const auto& [_, ctag] : conf->ConfTags(tag))
- {
- const std::string mask = ctag->getString(key);
- if (mask.empty())
- throw CoreException("<" + tag + ":" + key + "> missing at " + ctag->source.str());
-
- const std::string reason = ctag->getString("reason");
- if (reason.empty())
- throw CoreException("<" + tag + ":reason> missing at " + ctag->source.str());
-
- XLine* xl = make->Generate(ServerInstance->Time(), 0, ServerInstance->Config->ServerName, reason, mask);
- xl->from_config = true;
- configlines.insert(xl->Displayable());
- if (!ServerInstance->XLines->AddLine(xl, NULL))
- delete xl;
- }
-
- ServerInstance->XLines->ExpireRemovedConfigLines(make->GetType(), configlines);
-}
-
typedef std::map<std::string, std::shared_ptr<ConfigTag>> LocalIndex;
void ServerConfig::CrossCheckOperClassType()
{
@@ -363,11 +338,6 @@ void ServerConfig::Fill()
SocketEngine::Close(socktest);
}
- ReadXLine(this, "badip", "ipmask", ServerInstance->XLines->GetFactory("Z"));
- ReadXLine(this, "badnick", "nick", ServerInstance->XLines->GetFactory("Q"));
- ReadXLine(this, "badhost", "host", ServerInstance->XLines->GetFactory("K"));
- ReadXLine(this, "exception", "host", ServerInstance->XLines->GetFactory("E"));
-
const std::string restrictbannedusers = options->getString("restrictbannedusers", "yes", 1);
if (stdalgo::string::equalsci(restrictbannedusers, "no"))
RestrictBannedUsers = ServerConfig::BUT_NORMAL;
@@ -649,8 +619,6 @@ void ConfigReaderThread::OnStop()
* thoroughly!!!
*/
ServerInstance->Users.RehashCloneCounts();
- ServerInstance->XLines->CheckELines();
- ServerInstance->XLines->ApplyLines();
User* user = ServerInstance->Users.FindUUID(UUID);
ConfigStatus status(user);