summaryrefslogtreecommitdiff
path: root/src/opertype.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2016-11-11 12:58:14 -0500
committerAdam <Adam@anope.org>2016-11-11 12:58:14 -0500
commitef5b6919e3508cc9d4c722285d9d56f5a275f650 (patch)
tree56497f0a4f5d1847bae511c72bdb2d3581df58ef /src/opertype.cpp
parent8dd6e3195ed7600e39935e887df2626215733dfb (diff)
Fix opers not really being serializable
Diffstat (limited to 'src/opertype.cpp')
-rw-r--r--src/opertype.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/opertype.cpp b/src/opertype.cpp
index 91676bd84..c9c1b762c 100644
--- a/src/opertype.cpp
+++ b/src/opertype.cpp
@@ -93,6 +93,22 @@ void Oper::SetRequireOper(const bool &b)
Set(&OperBlockType::require_oper, b);
}
+bool Oper::HasCommand(const Anope::string &cmdstr)
+{
+ OperType *type = GetType();
+ if (type != nullptr)
+ return type->HasCommand(cmdstr);
+ return false;
+}
+
+bool Oper::HasPriv(const Anope::string &cmdstr)
+{
+ OperType *type = GetType();
+ if (type != nullptr)
+ return type->HasPriv(cmdstr);
+ return false;
+}
+
Oper *Oper::Find(const Anope::string &name)
{
for (Oper *o : Serialize::GetObjects<Oper *>())