diff options
| author | 2010-03-07 19:06:32 -0600 | |
|---|---|---|
| committer | 2010-08-03 17:32:39 -0400 | |
| commit | 907722538cf76f8937bf82f1680cdba32bdb282b (patch) | |
| tree | e26537c82f7b2dd41d096b0e42149d9b03295b60 /src/configparser.cpp | |
| parent | Move "topic" permisison back to "exempt/topiclock" like 2.0 (diff) | |
| download | inspircd++-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.cpp | 9 |
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; } |
