aboutsummaryrefslogtreecommitdiffstats
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorGravatar Peter Powell2017-10-16 02:37:57 +0100
committerGravatar Peter Powell2017-10-18 18:38:30 +0100
commit020c1d6ea658956e7cb2462a748790a4f4e30787 (patch)
treef06c01791ddf214d27a2b682da5ac41ed99d70c3 /src/configreader.cpp
parentClean up OnCleanup. (diff)
downloadinspircd++-020c1d6ea658956e7cb2462a748790a4f4e30787.tar.gz
inspircd++-020c1d6ea658956e7cb2462a748790a4f4e30787.tar.bz2
inspircd++-020c1d6ea658956e7cb2462a748790a4f4e30787.zip
Add a constructor to OperInfo and use it to set the type name.
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 6471413e0..2a50a22b3 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -158,9 +158,8 @@ void ServerConfig::CrossCheckOperClassType()
if (OperTypes.find(name) != OperTypes.end())
throw CoreException("Duplicate type block with name " + name + " at " + tag->getTagLocation());
- OperInfo* ifo = new OperInfo;
+ OperInfo* ifo = new OperInfo(name);
OperTypes[name] = ifo;
- ifo->name = name;
ifo->type_block = tag;
std::string classname;
@@ -190,8 +189,7 @@ void ServerConfig::CrossCheckOperClassType()
if (oper_blocks.find(name) != oper_blocks.end())
throw CoreException("Duplicate oper block with name " + name + " at " + tag->getTagLocation());
- OperInfo* ifo = new OperInfo;
- ifo->name = type;
+ OperInfo* ifo = new OperInfo(type);
ifo->oper_block = tag;
ifo->type_block = tblk->second->type_block;
ifo->class_blocks.assign(tblk->second->class_blocks.begin(), tblk->second->class_blocks.end());