blob: 20b90ad0884e4f715810cb4db0b77c4bb05182da (
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
/*
* Anope IRC Services
*
* Copyright (C) 2013-2017 Anope Team <team@anope.org>
*
* This file is part of Anope. Anope is free software; you can
* redistribute it and/or modify it under the terms of the GNU
* General Public License as published by the Free Software
* Foundation, version 2.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see see <http://www.gnu.org/licenses/>.
*/
class KickerData : public Serialize::Object
{
protected:
using Serialize::Object::Object;
public:
static constexpr const char *const NAME = "kickerdata";
virtual ChanServ::Channel *GetChannel() anope_abstract;
virtual void SetChannel(ChanServ::Channel *) anope_abstract;
virtual bool GetAmsgs() anope_abstract;
virtual void SetAmsgs(const bool &) anope_abstract;
virtual bool GetBadwords() anope_abstract;
virtual void SetBadwords(const bool &) anope_abstract;
virtual bool GetBolds() anope_abstract;
virtual void SetBolds(const bool &) anope_abstract;
virtual bool GetCaps() anope_abstract;
virtual void SetCaps(const bool &) anope_abstract;
virtual bool GetColors() anope_abstract;
virtual void SetColors(const bool &) anope_abstract;
virtual bool GetFlood() anope_abstract;
virtual void SetFlood(const bool &) anope_abstract;
virtual bool GetItalics() anope_abstract;
virtual void SetItalics(const bool &) anope_abstract;
virtual bool GetRepeat() anope_abstract;
virtual void SetRepeat(const bool &) anope_abstract;
virtual bool GetReverses() anope_abstract;
virtual void SetReverses(const bool &) anope_abstract;
virtual bool GetUnderlines() anope_abstract;
virtual void SetUnderlines(const bool &) anope_abstract;
virtual int16_t GetTTBBolds() anope_abstract;
virtual void SetTTBBolds(const int16_t &) anope_abstract;
virtual int16_t GetTTBColors() anope_abstract;
virtual void SetTTBColors(const int16_t &) anope_abstract;
virtual int16_t GetTTBReverses() anope_abstract;
virtual void SetTTBReverses(const int16_t &) anope_abstract;
virtual int16_t GetTTBUnderlines() anope_abstract;
virtual void SetTTBUnderlines(const int16_t &) anope_abstract;
virtual int16_t GetTTBBadwords() anope_abstract;
virtual void SetTTBBadwords(const int16_t &) anope_abstract;
virtual int16_t GetTTBCaps() anope_abstract;
virtual void SetTTBCaps(const int16_t &) anope_abstract;
virtual int16_t GetTTBFlood() anope_abstract;
virtual void SetTTBFlood(const int16_t &) anope_abstract;
virtual int16_t GetTTBRepeat() anope_abstract;
virtual void SetTTBRepeat(const int16_t &) anope_abstract;
virtual int16_t GetTTBItalics() anope_abstract;
virtual void SetTTBItalics(const int16_t &) anope_abstract;
virtual int16_t GetTTBAmsgs() anope_abstract;
virtual void SetTTBAmsgs(const int16_t &) anope_abstract;
virtual int16_t GetCapsMin() anope_abstract;
virtual void SetCapsMin(const int16_t &) anope_abstract;
virtual int16_t GetCapsPercent() anope_abstract;
virtual void SetCapsPercent(const int16_t &) anope_abstract;
virtual int16_t GetFloodLines() anope_abstract;
virtual void SetFloodLines(const int16_t &) anope_abstract;
virtual int16_t GetFloodSecs() anope_abstract;
virtual void SetFloodSecs(const int16_t &) anope_abstract;
virtual int16_t GetRepeatTimes() anope_abstract;
virtual void SetRepeatTimes(const int16_t &) anope_abstract;
virtual bool GetDontKickOps() anope_abstract;
virtual void SetDontKickOps(const bool &) anope_abstract;
virtual bool GetDontKickVoices() anope_abstract;
virtual void SetDontKickVoices(const bool &) anope_abstract;
};
inline KickerData *GetKickerData(ChanServ::Channel *ci)
{
KickerData *kd = ci->GetRef<KickerData *>();
if (!kd)
{
kd = Serialize::New<KickerData *>();
if (kd != nullptr)
{
kd->SetChannel(ci);
}
}
return kd;
}
namespace Event
{
struct CoreExport BotBan : Events
{
static constexpr const char *NAME = "botban";
using Events::Events;
/** Called when a bot places a ban
* @param u User being banned
* @param ci Channel the ban is placed on
* @param mask The mask being banned
*/
virtual void OnBotBan(User *u, ChanServ::Channel *ci, const Anope::string &mask) anope_abstract;
};
}
|