X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fconfigreader.cpp;h=957adc829f69bcbb2ebf1f0614c61dd299a8fd53;hb=e950f568d0f571e9475aa38177486468714de4d3;hp=af7a8ca59889f5fdad9ddbfba4acc39ebf12cbe7;hpb=9d4efff3957f1ad163f726bc44bed3a4870afb94;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/configreader.cpp b/src/configreader.cpp index af7a8ca59..957adc829 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -123,11 +123,11 @@ void ServerConfig::CrossCheckOperClassType() std::string name = tag->getString("name"); if (name.empty()) throw CoreException(" is missing from tag at " + tag->getTagLocation()); - if (oper_blocks.find(" " + name) != oper_blocks.end()) + if (OperTypes.find(name) != OperTypes.end()) throw CoreException("Duplicate type block with name " + name + " at " + tag->getTagLocation()); OperInfo* ifo = new OperInfo; - oper_blocks[" " + name] = ifo; + OperTypes[name] = ifo; ifo->name = name; ifo->type_block = tag; @@ -152,8 +152,8 @@ void ServerConfig::CrossCheckOperClassType() throw CoreException(" missing from tag at " + tag->getTagLocation()); std::string type = tag->getString("type"); - OperIndex::iterator tblk = oper_blocks.find(" " + type); - if (tblk == oper_blocks.end()) + OperIndex::iterator tblk = OperTypes.find(type); + if (tblk == OperTypes.end()) throw CoreException("Oper block " + name + " has missing type " + type); if (oper_blocks.find(name) != oper_blocks.end()) throw CoreException("Duplicate oper block with name " + name + " at " + tag->getTagLocation());