From bc6090c224e2feaeaad63064100a592e5dfa4546 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Mon, 15 Dec 2014 17:09:48 +0100 Subject: Add typedef PrivSet for OperInfo::AllowedOperCommands and AllowedPrivs --- include/configreader.h | 5 +++-- src/modules/m_check.cpp | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/configreader.h b/include/configreader.h index 342743991..35fa178a9 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -165,8 +165,9 @@ struct CommandLineConf class CoreExport OperInfo : public refcountbase { public: - std::set AllowedOperCommands; - std::set AllowedPrivs; + typedef std::set PrivSet; + PrivSet AllowedOperCommands; + PrivSet AllowedPrivs; /** Allowed user modes from oper classes. */ std::bitset<64> AllowedUserModes; diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index 92f003a84..8ae30bfed 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -160,7 +160,7 @@ class CommandCheck : public Command } user->SendText(checkstr + " modeperms user=" + umodes + " channel=" + cmodes); std::string opcmds; - for(std::set::iterator i = oper->AllowedOperCommands.begin(); i != oper->AllowedOperCommands.end(); i++) + for (OperInfo::PrivSet::const_iterator i = oper->AllowedOperCommands.begin(); i != oper->AllowedOperCommands.end(); ++i) { opcmds.push_back(' '); opcmds.append(*i); @@ -168,7 +168,7 @@ class CommandCheck : public Command std::stringstream opcmddump(opcmds); user->SendText(checkstr + " commandperms", opcmddump); std::string privs; - for(std::set::iterator i = oper->AllowedPrivs.begin(); i != oper->AllowedPrivs.end(); i++) + for (OperInfo::PrivSet::const_iterator i = oper->AllowedPrivs.begin(); i != oper->AllowedPrivs.end(); ++i) { privs.push_back(' '); privs.append(*i); -- cgit v1.2.3