diff --git a/src/opertype.cpp b/src/opertype.cpp index b8412205d..eb73c20f4 100644 --- a/src/opertype.cpp +++ b/src/opertype.cpp @@ -95,7 +95,8 @@ const Anope::string &OperType::GetName() const void OperType::Inherits(OperType *ot) { - this->inheritances.insert(ot); + if (ot != this) + this->inheritances.insert(ot); } const std::list OperType::GetCommands() const @@ -104,7 +105,7 @@ const std::list OperType::GetCommands() const for (std::set::const_iterator it = this->inheritances.begin(), it_end = this->inheritances.end(); it != it_end; ++it) { OperType *ot = *it; - std::list cmds = ot->GetPrivs(); + std::list cmds = ot->GetCommands(); for (std::list::const_iterator it2 = cmds.begin(), it2_end = cmds.end(); it2 != it2_end; ++it2) cmd_list.push_back(*it2); }