Anope IRC Services  Version 2.0
cs_mode.h
Go to the documentation of this file.
1 /* ChanServ core functions
2  *
3  * (C) 2003-2014 Anope Team
4  * Contact us at team@anope.org
5  *
6  * Please read COPYING and README for further details.
7  *
8  * Based on the original code of Epona by Lara.
9  * Based on the original code of Services by Andy Church.
10  */
11 
12 struct ModeLock
13 {
15  bool set;
19  time_t created;
20 
21  virtual ~ModeLock() { }
22  protected:
23  ModeLock() { }
24 };
25 
26 struct ModeLocks
27 {
28  typedef std::vector<ModeLock *> ModeList;
29 
30  virtual ~ModeLocks() { }
31 
38  virtual bool HasMLock(ChannelMode *mode, const Anope::string &param, bool status) const = 0;
39 
48  virtual bool SetMLock(ChannelMode *mode, bool status, const Anope::string &param = "", Anope::string setter = "", time_t created = Anope::CurTime) = 0;
49 
56  virtual bool RemoveMLock(ChannelMode *mode, bool status, const Anope::string &param = "") = 0;
57 
58  virtual void RemoveMLock(ModeLock *mlock) = 0;
59 
62  virtual void ClearMLock() = 0;
63 
67  virtual const ModeList &GetMLock() const = 0;
68 
73  virtual std::list<ModeLock *> GetModeLockList(const Anope::string &name) = 0;
74 
80  virtual const ModeLock *GetMLock(const Anope::string &mname, const Anope::string &param = "") = 0;
81 
86  virtual Anope::string GetMLockAsString(bool complete) const = 0;
87 
88  virtual void Check() = 0;
89 };
90 
virtual ~ModeLocks()
Definition: cs_mode.h:30
bool set
Definition: cs_mode.h:15
virtual void ClearMLock()=0
virtual bool RemoveMLock(ChannelMode *mode, bool status, const Anope::string &param="")=0
ModeLock()
Definition: cs_mode.h:23
virtual void Check()=0
Anope::string setter
Definition: cs_mode.h:18
virtual std::list< ModeLock * > GetModeLockList(const Anope::string &name)=0
virtual bool SetMLock(ChannelMode *mode, bool status, const Anope::string &param="", Anope::string setter="", time_t created=Anope::CurTime)=0
virtual bool HasMLock(ChannelMode *mode, const Anope::string &param, bool status) const =0
CoreExport time_t CurTime
Definition: main.cpp:41
std::vector< ModeLock * > ModeList
Definition: cs_mode.h:28
virtual Anope::string GetMLockAsString(bool complete) const =0
virtual const ModeList & GetMLock() const =0
Anope::string name
Definition: cs_mode.h:16
Anope::string ci
Definition: cs_mode.h:14
Anope::string name
Definition: access.cpp:22
Anope::string param
Definition: cs_mode.h:17
virtual ~ModeLock()
Definition: cs_mode.h:21
time_t created
Definition: cs_mode.h:19