diff options
Diffstat (limited to 'modules/commands/cs_suspend.cpp')
-rw-r--r-- | modules/commands/cs_suspend.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/commands/cs_suspend.cpp b/modules/commands/cs_suspend.cpp index f076ae361..48dcd4045 100644 --- a/modules/commands/cs_suspend.cpp +++ b/modules/commands/cs_suspend.cpp @@ -13,11 +13,15 @@ #include "module.h" -struct ChanSuspend : ExtensibleItem, Serializable<ChanSuspend> +struct ChanSuspend : ExtensibleItem, Serializable { Anope::string chan; time_t when; + ChanSuspend() : Serializable("ChanSuspend") + { + } + serialized_data serialize() { serialized_data sd; @@ -195,19 +199,18 @@ class CommandCSUnSuspend : public Command class CSSuspend : public Module { + SerializeType chansuspend_type; CommandCSSuspend commandcssuspend; CommandCSUnSuspend commandcsunsuspend; public: CSSuspend(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), - commandcssuspend(this), commandcsunsuspend(this) + chansuspend_type("ChanSuspend", ChanSuspend::unserialize), commandcssuspend(this), commandcsunsuspend(this) { this->SetAuthor("Anope"); Implementation i[] = { I_OnPreChanExpire }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); - - Serializable<ChanSuspend>::Alloc.Register("ChanSuspend"); } ~CSSuspend() |