diff options
-rw-r--r-- | include/inspircd.h | 2 | ||||
-rw-r--r-- | include/users.h | 3 | ||||
-rw-r--r-- | src/inspircd.cpp | 2 | ||||
-rw-r--r-- | src/users.cpp | 4 |
4 files changed, 6 insertions, 5 deletions
diff --git a/include/inspircd.h b/include/inspircd.h index 4e37fae8d..3993142c7 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -45,7 +45,7 @@ #include <deque> #include <map> #include <bitset> - +#include <set> /** A list of failed port bindings, used for informational purposes on startup */ typedef std::vector<std::pair<std::string, std::string> > FailedPortList; diff --git a/include/users.h b/include/users.h index 7492d31e0..2f8730088 100644 --- a/include/users.h +++ b/include/users.h @@ -439,7 +439,8 @@ class CoreExport User : public EventHandler */ void DecrementModes(); - std::map<std::string, bool>* AllowedOperCommands; + std::set<std::string> *AllowedOperCommands; + std::set<std::string> *AllowedPrivs; /** Allowed user modes from oper classes. */ std::bitset<64> AllowedUserModes; diff --git a/src/inspircd.cpp b/src/inspircd.cpp index c1be9812b..3a2392ee6 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -656,7 +656,7 @@ InspIRCd::InspIRCd(int argc, char** argv) /* set up fake client again this time with the correct uid */ this->FakeClient = new User(this, "#INVALID"); this->FakeClient->SetFd(FD_MAGIC_NUMBER); - this->FakeClient->HasPrivPermission("users", "override/topic"); + this->FakeClient->HasPrivPermission("users/override/topic"); exit(0); // Get XLine to do it's thing. diff --git a/src/users.cpp b/src/users.cpp index f5af3a803..3b69c1a25 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -721,7 +721,7 @@ void User::Oper(const std::string &opertype, const std::string &opername) if (AllowedOperCommands) AllowedOperCommands->clear(); else - AllowedOperCommands = new std::map<std::string, bool>; + AllowedOperCommands = new std::set<std::string>; AllowedUserModes.reset(); AllowedChanModes.reset(); @@ -737,7 +737,7 @@ void User::Oper(const std::string &opertype, const std::string &opername) irc::spacesepstream CommandList(iter_operclass->second.commandlist); while (CommandList.GetToken(mycmd)) { - this->AllowedOperCommands->insert(std::make_pair(mycmd, true)); + this->AllowedOperCommands->insert(mycmd); } for (unsigned char* c = (unsigned char*)iter_operclass->second.umodelist; *c; ++c) { |