Anope IRC Services  Version 2.0
bs_badwords.h
Go to the documentation of this file.
1 /* BotServ 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  */
13 
17 {
18  /* Always kicks if the word is said */
20  /* User must way the entire word */
22  /* The word has to start with the badword */
24  /* The word has to end with the badword */
26 };
27 
28 /* Structure used to contain bad words. */
29 struct BadWord
30 {
34 
35  virtual ~BadWord() { }
36  protected:
37  BadWord() { }
38 };
39 
40 struct BadWords
41 {
42  virtual ~BadWords() { }
43 
49  virtual BadWord* AddBadWord(const Anope::string &word, BadWordType type) = 0;
50 
55  virtual BadWord* GetBadWord(unsigned index) const = 0;
56 
60  virtual unsigned GetBadWordCount() const = 0;
61 
65  virtual void EraseBadWord(unsigned index) = 0;
66 
69  virtual void ClearBadWords() = 0;
70 
71  virtual void Check() = 0;
72 };
73 
virtual ~BadWords()
Definition: bs_badwords.h:42
BadWordType type
Definition: bs_badwords.h:33
Anope::string word
Definition: bs_badwords.h:32
Anope::string chan
Definition: bs_badwords.h:31
virtual void Check()=0
virtual BadWord * GetBadWord(unsigned index) const =0
virtual unsigned GetBadWordCount() const =0
virtual void ClearBadWords()=0
virtual void EraseBadWord(unsigned index)=0
virtual BadWord * AddBadWord(const Anope::string &word, BadWordType type)=0
virtual ~BadWord()
Definition: bs_badwords.h:35
BadWordType
Definition: bs_badwords.h:16