summaryrefslogtreecommitdiff
path: root/include/modules/cs_akick.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/modules/cs_akick.h')
-rw-r--r--include/modules/cs_akick.h34
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;
};
}