bool Oper::HasCommand(const Anope::string &cmdstr) { OperType *type = GetType(); if (type != nullptr) return type->HasCommand(cmdstr); return false; }
bool OperType::HasCommand(const Anope::string &cmdstr) const { for (std::list<Anope::string>::const_iterator it = this->commands.begin(), it_end = this->commands.end(); it != it_end; ++it) { const Anope::string &s = *it; if (!s.find('~') && Anope::Match(cmdstr, s.substr(1))) return false; else if (Anope::Match(cmdstr, s)) return true; } for (std::set<OperType *>::const_iterator iit = this->inheritances.begin(), iit_end = this->inheritances.end(); iit != iit_end; ++iit) { OperType *ot = *iit; if (ot->HasCommand(cmdstr)) return true; } return false; }