diff options
| author | 2013-08-13 14:22:07 +0200 | |
|---|---|---|
| committer | 2013-08-13 14:22:07 +0200 | |
| commit | 19cc8380fb9060add68852e40846b10e4d1f18f5 (patch) | |
| tree | 8b8a60b706e66b8e4433da198c743b54d9730927 /src/configreader.cpp | |
| parent | Clean up a few constructors (diff) | |
| download | inspircd++-19cc8380fb9060add68852e40846b10e4d1f18f5.tar.gz inspircd++-19cc8380fb9060add68852e40846b10e4d1f18f5.tar.bz2 inspircd++-19cc8380fb9060add68852e40846b10e4d1f18f5.zip | |
Store oper types and opers in separate containers
Diffstat (limited to 'src/configreader.cpp')
| -rw-r--r-- | src/configreader.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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("<type:name> 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("<oper:name> 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()); |
