diff options
author | Adam <Adam@anope.org> | 2015-10-27 13:21:24 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2015-10-27 13:21:24 -0400 |
commit | 162fdbe5815bbdf187f549fefac94ff476d72e62 (patch) | |
tree | 1c58968fd29dd90ef8ab6dc0f3013d88b313ce4e /modules/commands/cs_access.cpp | |
parent | c6a92296d4175a2d2276c2d5a46894af3d9085f4 (diff) |
Beginning of new module dependency stuff, seems to compile and link. Move some of the madness in chanserv.h to the module.
Diffstat (limited to 'modules/commands/cs_access.cpp')
-rw-r--r-- | modules/commands/cs_access.cpp | 19 |
1 files changed, 15 insertions, 4 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) |