diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-18 16:52:46 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-18 16:52:46 +0000 |
commit | f43283920224b3d762ae371d7320024512a8afde (patch) | |
tree | 229f5e29aa542b20b0b5620c8e4399a1603df22c /src | |
parent | ca42e175351b6209a8e9cbd5eb92bba4f38a38ce (diff) |
Migrate oper commands to an std::set, add a set for privs also. Change the API a bit.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10661 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/inspircd.cpp | 2 | ||||
-rw-r--r-- | src/users.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
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) { |