Anope IRC Services  Version 2.0
os_forbid.h
Go to the documentation of this file.
1 #ifndef OS_FORBID_H
2 #define OS_FORBID_H
3 
5 {
6  FT_NICK = 1,
11 };
12 
13 struct ForbidData
14 {
18  time_t created;
19  time_t expires;
21 
22  virtual ~ForbidData() { }
23  protected:
24  ForbidData() : created(0), expires(0) { }
25 };
26 
27 class ForbidService : public Service
28 {
29  public:
30  ForbidService(Module *m) : Service(m, "ForbidService", "forbid") { }
31 
32  virtual void AddForbid(ForbidData *d) = 0;
33 
34  virtual void RemoveForbid(ForbidData *d) = 0;
35 
36  virtual ForbidData* CreateForbid() = 0;
37 
38  virtual ForbidData *FindForbid(const Anope::string &mask, ForbidType type) = 0;
39 
40  virtual std::vector<ForbidData *> GetForbids() = 0;
41 };
42 
43 static ServiceReference<ForbidService> forbid_service("ForbidService", "forbid");
44 
45 #endif
46 
time_t created
Definition: os_forbid.h:18
ForbidType type
Definition: os_forbid.h:20
virtual ForbidData * FindForbid(const Anope::string &mask, ForbidType type)=0
Anope::string mask
Definition: os_forbid.h:15
Anope::string reason
Definition: os_forbid.h:17
static ServiceReference< ForbidService > forbid_service("ForbidService","forbid")
Anope::string type
Definition: service.h:86
virtual void RemoveForbid(ForbidData *d)=0
virtual ForbidData * CreateForbid()=0
ForbidData()
Definition: os_forbid.h:24
ForbidType
Definition: os_forbid.h:4
Anope::string creator
Definition: os_forbid.h:16
ForbidService(Module *m)
Definition: os_forbid.h:30
time_t expires
Definition: os_forbid.h:19
virtual ~ForbidData()
Definition: os_forbid.h:22
virtual void AddForbid(ForbidData *d)=0
virtual std::vector< ForbidData * > GetForbids()=0