summaryrefslogtreecommitdiffstats
path: root/src/configparser.cpp
diff options
context:
space:
mode:
authorGravatar Daniel De Graaf2010-03-07 19:06:32 -0600
committerGravatar Daniel De Graaf2010-08-03 17:32:39 -0400
commit907722538cf76f8937bf82f1680cdba32bdb282b (patch)
treee26537c82f7b2dd41d096b0e42149d9b03295b60 /src/configparser.cpp
parentMove "topic" permisison back to "exempt/topiclock" like 2.0 (diff)
downloadinspircd++-907722538cf76f8937bf82f1680cdba32bdb282b.tar.gz
inspircd++-907722538cf76f8937bf82f1680cdba32bdb282b.tar.bz2
inspircd++-907722538cf76f8937bf82f1680cdba32bdb282b.zip
Change OperInfo to store oper/type/class together.
This allows privelages to be granted using <oper:commands> or <type:commands> instead of requiring <class> blocks.
Diffstat (limited to 'src/configparser.cpp')
-rw-r--r--src/configparser.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/configparser.cpp b/src/configparser.cpp
index 587f3f21d..3b4b743ab 100644
--- a/src/configparser.cpp
+++ b/src/configparser.cpp
@@ -496,9 +496,10 @@ ConfigTag::ConfigTag(const std::string& Tag, const std::string& file, int line)
std::string OperInfo::getConfig(const std::string& key)
{
std::string rv;
- if (type_block)
- type_block->readString(key, rv);
- if (oper_block)
- oper_block->readString(key, rv);
+ for(std::vector<reference<ConfigTag> >::iterator i = config_blocks.begin(); i != config_blocks.end(); i++)
+ {
+ if ((**i).readString(key, rv))
+ return rv;
+ }
return rv;
}