summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-04-08 01:05:25 -0500
committerAdam <Adam@anope.org>2013-04-08 01:05:25 -0500
commitbcd85ca68281b8f10d4357d6f7daeced4b79a9b4 (patch)
treeebed269b1ab2ea1c26c8ce7a9bc2f396a8d3fff8 /src
parentac40c53fe41cd193526f51f20b4400ebc0356439 (diff)
Fix OperType::GetCommands
Diffstat (limited to 'src')
-rw-r--r--src/opertype.cpp5
1 files changed, 3 insertions, 2 deletions
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<Anope::string> OperType::GetCommands() const
@@ -104,7 +105,7 @@ const std::list<Anope::string> OperType::GetCommands() const
for (std::set<OperType *>::const_iterator it = this->inheritances.begin(), it_end = this->inheritances.end(); it != it_end; ++it)
{
OperType *ot = *it;
- std::list<Anope::string> cmds = ot->GetPrivs();
+ std::list<Anope::string> cmds = ot->GetCommands();
for (std::list<Anope::string>::const_iterator it2 = cmds.begin(), it2_end = cmds.end(); it2 != it2_end; ++it2)
cmd_list.push_back(*it2);
}