blob: 08a72260fdd73874eeeefba0d8768f66676e21ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
/*
*
* (C) 2014 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
*/
/* 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
{
/** Called after adding an akick to a channel
* @param source The source of the command
* @param ci The channel
* @param ak The akick
*/
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, ChanServ::Channel *ci, const AutoKick *ak) anope_abstract;
};
}
|