blob: 3dd7e395951f0922222a9ee629e2489198e4b234 (
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
|
/*
*
* (C) 2011-2024 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
#pragma once
enum ForbidType
{
FT_NICK = 1,
FT_CHAN,
FT_EMAIL,
FT_REGISTER,
FT_SIZE
};
struct ForbidData
{
Anope::string mask;
Anope::string creator;
Anope::string reason;
time_t created = 0;
time_t expires = 0;
ForbidType type;
virtual ~ForbidData() = default;
protected:
ForbidData() = default;
};
class ForbidService
: public Service
{
public:
ForbidService(Module *m) : Service(m, "ForbidService", "forbid") { }
virtual void AddForbid(ForbidData *d) = 0;
virtual void RemoveForbid(ForbidData *d) = 0;
virtual ForbidData *CreateForbid() = 0;
virtual ForbidData *FindForbid(const Anope::string &mask, ForbidType type) = 0;
virtual ForbidData *FindForbidExact(const Anope::string &mask, ForbidType type) = 0;
virtual std::vector<ForbidData *> GetForbids() = 0;
};
static ServiceReference<ForbidService> forbid_service("ForbidService", "forbid");
|