diff options
author | Adam <Adam@anope.org> | 2014-05-28 12:07:29 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-05-28 12:07:54 -0400 |
commit | f29e1cf383529a1a29f02b0669d973f5ee0b7a66 (patch) | |
tree | 3c33db276dc9328235bbd572641521ed44458176 /include/modules/cs_akick.h | |
parent | 1253c70e0682fa1490c99c3d2869049a0e3fa2e0 (diff) |
Move most of the core pseudoclient logic to modules
Diffstat (limited to 'include/modules/cs_akick.h')
-rw-r--r-- | include/modules/cs_akick.h | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/include/modules/cs_akick.h b/include/modules/cs_akick.h index ab02985c1..08a72260f 100644 --- a/include/modules/cs_akick.h +++ b/include/modules/cs_akick.h @@ -7,6 +7,36 @@ * */ + /* AutoKick data. */ +class CoreExport AutoKick : public Serializable +{ + public: + /* Channel this autokick is on */ + Serialize::Reference<ChanServ::Channel> ci; + + Anope::string mask; + Serialize::Reference<NickServ::Account> nc; + + Anope::string reason; + Anope::string creator; + time_t addtime; + time_t last_used; + + protected: + AutoKick() : Serializable("AutoKick") { } + public: + virtual ~AutoKick() { } +}; + +class AutoKickService : public Service +{ + public: + AutoKickService(Module *o) : Service(o, "AutoKickService", "AutoKickService") { } + + virtual AutoKick* Create() anope_abstract; +}; +static ServiceReference<AutoKickService> akick("AutoKickService", "AutoKickService"); + namespace Event { struct CoreExport Akick : Events @@ -16,13 +46,13 @@ namespace Event * @param ci The channel * @param ak The akick */ - virtual void OnAkickAdd(CommandSource &source, ChannelInfo *ci, const AutoKick *ak) anope_abstract; + virtual void OnAkickAdd(CommandSource &source, ChanServ::Channel *ci, const AutoKick *ak) anope_abstract; /** Called before removing an akick from a channel * @param source The source of the command * @param ci The channel * @param ak The akick */ - virtual void OnAkickDel(CommandSource &source, ChannelInfo *ci, const AutoKick *ak) anope_abstract; + virtual void OnAkickDel(CommandSource &source, ChanServ::Channel *ci, const AutoKick *ak) anope_abstract; }; } |