1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 02:26:39 +02:00

Implement opertype methods for priv/command access.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2069 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
rburchell
2009-02-15 15:24:12 +00:00
parent 92170818ff
commit c8aae1c6ee
+16
View File
@@ -17,12 +17,28 @@ OperType::OperType(const std::string &nname) : name(nname)
bool OperType::HasCommand(const std::string &cmdstr) const
{
for (std::list<std::string>::const_iterator it = this->commands.begin(); it != this->commands.end(); it++)
{
if (Anope::Match(cmdstr, *it))
{
return true;
}
}
return false;
}
bool OperType::HasPriv(const std::string &privstr) const
{
for (std::list<std::string>::const_iterator it = this->privs.begin(); it != this->privs.end(); it++)
{
if (Anope::Match(privstr, *it))
{
return true;
}
}
return false;
}
void OperType::AddCommand(const std::string &cmdstr)