1
0
mirror of https://github.com/anope/anope.git synced 2026-06-27 16:26:39 +02:00
Files
anope/src/opertype.cpp
T
pimpmylinux 0a61c06860 updated copyright info for 2010
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2753 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-11 19:36:24 +00:00

59 lines
1.0 KiB
C++

/*
* Copyright (C) 2008-2010 Robin Burchell <w00t@inspircd.org>
* Copyright (C) 2008-2010 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*
*
* $Id$
*
*/
#include "services.h"
OperType::OperType(const ci::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)
{
this->commands.push_back(cmdstr);
}
void OperType::AddPriv(const std::string &privstr)
{
this->privs.push_back(privstr);
}
const ci::string &OperType::GetName() const
{
return this->name;
}