X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fconfigreader.cpp;h=782a80080aad8e9e83cc4e741ce557c30733ad01;hb=687778b72e31322a73b2e2e17af6bd0f2a2561bc;hp=0318dd602cb9f071dd9ca5a09369117046e6f23e;hpb=87b1461e2a4710a38b32186c2582da9fe9bb3804;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/configreader.cpp b/src/configreader.cpp index 0318dd602..782a80080 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -80,11 +80,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", ""); - XLine* xl = make->Generate(ServerInstance->Time(), 0, "", 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))