summaryrefslogtreecommitdiff
path: root/modules/commands
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands')
-rw-r--r--modules/commands/cs_access.cpp19
-rw-r--r--modules/commands/cs_flags.cpp17
-rw-r--r--modules/commands/cs_xop.cpp17
3 files changed, 41 insertions, 12 deletions
diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp
index 6f1f0f1f0..982d5763f 100644
--- a/modules/commands/cs_access.cpp
+++ b/modules/commands/cs_access.cpp
@@ -9,15 +9,19 @@
* Based on the original code of Services by Andy Church.
*/
+/* Dependencies: chanserv */
+
#include "module.h"
#include "modules/chanserv.h"
#include "modules/cs_access.h"
+#include "../pseudoclients/chanserv/chanaccess.h"
+#include "../pseudoclients/chanserv/chanaccesstype.h"
-class AccessChanAccess : public ChanServ::ChanAccess
+class AccessChanAccess : public ChanAccessImpl
{
public:
- AccessChanAccess(Serialize::TypeBase *type) : ChanServ::ChanAccess(type) { }
- AccessChanAccess(Serialize::TypeBase *type, Serialize::ID id) : ChanServ::ChanAccess(type, id) { }
+ AccessChanAccess(Serialize::TypeBase *type) : ChanAccessImpl(type) { }
+ AccessChanAccess(Serialize::TypeBase *type, Serialize::ID id) : ChanAccessImpl(type, id) { }
int GetLevel();
void SetLevel(const int &);
@@ -43,6 +47,7 @@ class AccessChanAccess : public ChanServ::ChanAccess
}
}
+#if 0
bool operator>(ChanServ::ChanAccess &other) override
{
if (this->GetSerializableType() != other.GetSerializableType())
@@ -58,9 +63,10 @@ class AccessChanAccess : public ChanServ::ChanAccess
else
return this->GetLevel() < anope_dynamic_static_cast<AccessChanAccess *>(&other)->GetLevel();
}
+#endif
};
-class AccessChanAccessType : public Serialize::Type<AccessChanAccess, ChanServ::ChanAccessType>
+class AccessChanAccessType : public Serialize::Type<AccessChanAccess, ChanAccessType>
{
public:
Serialize::Field<AccessChanAccess, int> level;
@@ -920,4 +926,9 @@ class CSAccess : public Module
}
};
+template<> void ModuleInfo<CSAccess>(ModuleDef *def)
+{
+ def->Depends("chanserv");
+}
+
MODULE_INIT(CSAccess)
diff --git a/modules/commands/cs_flags.cpp b/modules/commands/cs_flags.cpp
index c8ef11796..88cc501ac 100644
--- a/modules/commands/cs_flags.cpp
+++ b/modules/commands/cs_flags.cpp
@@ -9,16 +9,20 @@
* Based on the original code of Services by Andy Church.
*/
+/* Dependencies: chanserv */
+
#include "module.h"
#include "modules/cs_access.h"
+#include "../pseudoclients/chanserv/chanaccess.h"
+#include "../pseudoclients/chanserv/chanaccesstype.h"
static std::map<Anope::string, char> defaultFlags;
-class FlagsChanAccess : public ChanServ::ChanAccess
+class FlagsChanAccess : public ChanAccessImpl
{
public:
- FlagsChanAccess(Serialize::TypeBase *type) : ChanServ::ChanAccess(type) { }
- FlagsChanAccess(Serialize::TypeBase *type, Serialize::ID id) : ChanServ::ChanAccess(type, id) { }
+ FlagsChanAccess(Serialize::TypeBase *type) : ChanAccessImpl(type) { }
+ FlagsChanAccess(Serialize::TypeBase *type, Serialize::ID id) : ChanAccessImpl(type, id) { }
Anope::string GetFlags();
void SetFlags(const Anope::string &);
@@ -57,7 +61,7 @@ class FlagsChanAccess : public ChanServ::ChanAccess
}
};
-class FlagsChanAccessType : public Serialize::Type<FlagsChanAccess, ChanServ::ChanAccessType>
+class FlagsChanAccessType : public Serialize::Type<FlagsChanAccess, ChanAccessType>
{
public:
Serialize::Field<FlagsChanAccess, Anope::string> flags;
@@ -518,4 +522,9 @@ class CSFlags : public Module
}
};
+template<> void ModuleInfo<CSFlags>(ModuleDef *def)
+{
+ def->Depends("chanserv");
+}
+
MODULE_INIT(CSFlags)
diff --git a/modules/commands/cs_xop.cpp b/modules/commands/cs_xop.cpp
index 0de467f4f..891ac77e7 100644
--- a/modules/commands/cs_xop.cpp
+++ b/modules/commands/cs_xop.cpp
@@ -9,8 +9,12 @@
* Based on the original code of Services by Andy Church.
*/
+/* Dependencies: chanserv */
+
#include "module.h"
#include "modules/cs_access.h"
+#include "../pseudoclients/chanserv/chanaccess.h"
+#include "../pseudoclients/chanserv/chanaccesstype.h"
namespace
{
@@ -18,11 +22,11 @@ namespace
std::map<Anope::string, std::vector<Anope::string> > permissions;
}
-class XOPChanAccess : public ChanServ::ChanAccess
+class XOPChanAccess : public ChanAccessImpl
{
public:
- XOPChanAccess(Serialize::TypeBase *type) : ChanServ::ChanAccess(type) { }
- XOPChanAccess(Serialize::TypeBase *type, Serialize::ID id) : ChanServ::ChanAccess(type, id) { }
+ XOPChanAccess(Serialize::TypeBase *type) : ChanAccessImpl(type) { }
+ XOPChanAccess(Serialize::TypeBase *type, Serialize::ID id) : ChanAccessImpl(type, id) { }
Anope::string GetType();
void SetType(const Anope::string &);
@@ -81,7 +85,7 @@ class XOPChanAccess : public ChanServ::ChanAccess
};
-class XOPChanAccessType : public Serialize::Type<XOPChanAccess, ChanServ::ChanAccessType>
+class XOPChanAccessType : public Serialize::Type<XOPChanAccess, ChanAccessType>
{
public:
Serialize::Field<XOPChanAccess, Anope::string> type;
@@ -648,4 +652,9 @@ class CSXOP : public Module
}
};
+template<> void ModuleInfo<CSXOP>(ModuleDef *def)
+{
+ def->Depends("chanserv");
+}
+
MODULE_INIT(CSXOP)