aboutsummaryrefslogtreecommitdiffstats
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2019-12-08 17:38:47 +0000
committerGravatar Sadie Powell2019-12-08 17:47:07 +0000
commit034dad6ab0df48172a70de70a9d0de4a9092112e (patch)
tree0e852f3554dbce37d8e2e360fa099148155e8cab /src/configreader.cpp
parentMove the nationalchars locale files to the docs directory. (diff)
parentClean up the initialisation of the InspIRCd class. (diff)
downloadinspircd++-034dad6ab0df48172a70de70a9d0de4a9092112e.tar.gz
inspircd++-034dad6ab0df48172a70de70a9d0de4a9092112e.tar.bz2
inspircd++-034dad6ab0df48172a70de70a9d0de4a9092112e.zip
Merge branch 'insp3' into master.
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 666d7a492..51cb116f7 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -81,11 +81,16 @@ static void ReadXLine(ServerConfig* conf, const std::string& tag, const std::str
for(ConfigIter i = tags.first; i != tags.second; ++i)
{
ConfigTag* ctag = i->second;
- std::string mask;
- if (!ctag->readString(key, mask))
- throw CoreException("<"+tag+":"+key+"> missing at " + ctag->getTagLocation());
- std::string reason = ctag->getString("reason", "<Config>");
- XLine* xl = make->Generate(ServerInstance->Time(), 0, "<Config>", reason, mask);
+
+ const std::string mask = ctag->getString(key);
+ if (mask.empty())
+ throw CoreException("<" + tag + ":" + key + "> missing at " + ctag->getTagLocation());
+
+ const std::string reason = ctag->getString("reason");
+ if (reason.empty())
+ throw CoreException("<" + tag + ":reason> missing at " + ctag->getTagLocation());
+
+ 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))