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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
|
.TH "modules.cpp" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
modules.cpp \-
.SH SYNOPSIS
.br
.PP
\fC#include 'inspircd_config.h'\fP
.br
\fC#include 'inspircd.h'\fP
.br
\fC#include 'inspircd_io.h'\fP
.br
\fC#include 'inspircd_util.h'\fP
.br
\fC#include <unistd.h>\fP
.br
\fC#include <sys/errno.h>\fP
.br
\fC#include <time.h>\fP
.br
\fC#include <string>\fP
.br
\fC#include <hash_map>\fP
.br
\fC#include <map>\fP
.br
\fC#include <sstream>\fP
.br
\fC#include <vector>\fP
.br
\fC#include <deque>\fP
.br
\fC#include 'users.h'\fP
.br
\fC#include 'ctables.h'\fP
.br
\fC#include 'globals.h'\fP
.br
\fC#include 'modules.h'\fP
.br
\fC#include 'dynamic.h'\fP
.br
\fC#include 'wildcard.h'\fP
.br
\fC#include 'message.h'\fP
.br
\fC#include 'mode.h'\fP
.br
\fC#include 'xline.h'\fP
.br
\fC#include 'commands.h'\fP
.br
\fC#include 'inspstring.h'\fP
.br
\fC#include 'helperfuncs.h'\fP
.br
\fC#include 'hashcomp.h'\fP
.br
\fC#include 'socket.h'\fP
.br
\fC#include 'socketengine.h'\fP
.br
\fC#include 'typedefs.h'\fP
.br
.SS "Functions"
.in +1c
.ti -1c
.RI "bool \fBModeDefined\fP (char modechar, int type)"
.br
.ti -1c
.RI "bool \fBModeIsListMode\fP (char modechar, int type)"
.br
.ti -1c
.RI "bool \fBModeDefinedOper\fP (char modechar, int type)"
.br
.ti -1c
.RI "int \fBModeDefinedOn\fP (char modechar, int type)"
.br
.ti -1c
.RI "int \fBModeDefinedOff\fP (char modechar, int type)"
.br
.ti -1c
.RI "bool \fBDoAddExtendedMode\fP (char modechar, int type, bool requires_oper, int params_on, int params_off)"
.br
.ti -1c
.RI "void \fBModeMakeList\fP (char modechar)"
.br
.ti -1c
.RI "std::vector< \fBModule\fP * > \fBmodules\fP (255)"
.br
.ti -1c
.RI "std::vector< \fBircd_module\fP * > \fBfactory\fP (255)"
.br
.in -1c
.SS "Variables"
.in +1c
.ti -1c
.RI "\fBSocketEngine\fP * \fBSE\fP"
.br
.ti -1c
.RI "\fBServerConfig\fP * \fBConfig\fP"
.br
.ti -1c
.RI "int \fBMODCOUNT\fP = -1"
.br
.ti -1c
.RI "std::vector< \fBModule\fP * > \fBmodules\fP"
.br
.ti -1c
.RI "std::vector< \fBircd_module\fP * > \fBfactory\fP"
.br
.ti -1c
.RI "std::vector< \fBInspSocket\fP * > \fBmodule_sockets\fP"
.br
.ti -1c
.RI "time_t \fBTIME\fP"
.br
.ti -1c
.RI "int \fBWHOWAS_STALE\fP"
.br
.ti -1c
.RI "int \fBWHOWAS_MAX\fP"
.br
.ti -1c
.RI "time_t \fBstartup_time\fP"
.br
.ti -1c
.RI "int \fBboundPortCount\fP"
.br
.ti -1c
.RI "int \fBportCount\fP"
.br
.ti -1c
.RI "int \fBports\fP [MAXSOCKS]"
.br
.ti -1c
.RI "\fBuserrec\fP * \fBfd_ref_table\fP [65536]"
.br
.ti -1c
.RI "\fBuser_hash\fP \fBclientlist\fP"
.br
.ti -1c
.RI "\fBchan_hash\fP \fBchanlist\fP"
.br
.ti -1c
.RI "\fBwhowas_hash\fP \fBwhowas\fP"
.br
.ti -1c
.RI "\fBcommand_table\fP \fBcmdlist\fP"
.br
.ti -1c
.RI "\fBaddress_cache\fP \fBIP\fP"
.br
.ti -1c
.RI "\fBExtModeList\fP \fBEMode\fP"
.br
.in -1c
.SH "Function Documentation"
.PP
.SS "bool DoAddExtendedMode (char modechar, int type, bool requires_oper, int params_on, int params_off)"
.PP
Definition at line 142 of file modules.cpp.
.PP
References EMode, and ModeDefined().
.PP
Referenced by Server::AddExtendedListMode(), and Server::AddExtendedMode().
.PP
.nf
143 {
144 if (ModeDefined(modechar,type)) {
145 return false;
146 }
147 EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off));
148 return true;
149 }
.fi
.PP
.SS "std::vector<\fBircd_module\fP*> factory (255)"
.PP
.SS "bool ModeDefined (char modechar, int type)"
.PP
Definition at line 79 of file modules.cpp.
.PP
References EMode.
.PP
Referenced by DoAddExtendedMode().
.PP
.nf
80 {
81 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
82 {
83 if ((i->modechar == modechar) && (i->type == type))
84 {
85 return true;
86 }
87 }
88 return false;
89 }
.fi
.PP
.SS "int ModeDefinedOff (char modechar, int type)"
.PP
Definition at line 129 of file modules.cpp.
.PP
References EMode.
.PP
.nf
130 {
131 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
132 {
133 if ((i->modechar == modechar) && (i->type == type))
134 {
135 return i->params_when_off;
136 }
137 }
138 return 0;
139 }
.fi
.PP
.SS "int ModeDefinedOn (char modechar, int type)"
.PP
Definition at line 116 of file modules.cpp.
.PP
References EMode.
.PP
.nf
117 {
118 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
119 {
120 if ((i->modechar == modechar) && (i->type == type))
121 {
122 return i->params_when_on;
123 }
124 }
125 return 0;
126 }
.fi
.PP
.SS "bool ModeDefinedOper (char modechar, int type)"
.PP
Definition at line 103 of file modules.cpp.
.PP
References EMode.
.PP
.nf
104 {
105 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
106 {
107 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
108 {
109 return true;
110 }
111 }
112 return false;
113 }
.fi
.PP
.SS "bool ModeIsListMode (char modechar, int type)"
.PP
Definition at line 91 of file modules.cpp.
.PP
References EMode.
.PP
.nf
92 {
93 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
94 {
95 if ((i->modechar == modechar) && (i->type == type) && (i->list == true))
96 {
97 return true;
98 }
99 }
100 return false;
101 }
.fi
.PP
.SS "void ModeMakeList (char modechar)"
.PP
Definition at line 152 of file modules.cpp.
.PP
References EMode, and MT_CHANNEL.
.PP
Referenced by Server::AddExtendedListMode().
.PP
.nf
153 {
154 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
155 {
156 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
157 {
158 i->list = true;
159 return;
160 }
161 }
162 return;
163 }
.fi
.PP
.SS "std::vector<\fBModule\fP*> modules (255)"
.PP
.SH "Variable Documentation"
.PP
.SS "int \fBboundPortCount\fP"
.PP
.SS "\fBchan_hash\fP \fBchanlist\fP"
.PP
.SS "\fBuser_hash\fP \fBclientlist\fP"
.PP
.SS "\fBcommand_table\fP \fBcmdlist\fP"
.PP
.SS "\fBServerConfig\fP* \fBConfig\fP"
.PP
.SS "\fBExtModeList\fP \fBEMode\fP"
.PP
Definition at line 76 of file modules.cpp.
.PP
Referenced by DoAddExtendedMode(), ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), ModeDefinedOper(), ModeIsListMode(), and ModeMakeList().
.SS "std::vector<\fBircd_module\fP*> factory"
.PP
.SS "\fBuserrec\fP* \fBfd_ref_table\fP[65536]"
.PP
.SS "\fBaddress_cache\fP \fBIP\fP"
.PP
.SS "int \fBMODCOUNT\fP = -1"
.PP
Definition at line 933 of file modules.cpp.
.SS "std::vector<\fBInspSocket\fP*> \fBmodule_sockets\fP"
.PP
Referenced by Server::AddSocket(), and Server::DelSocket().
.SS "std::vector<\fBModule\fP*> modules"
.PP
.SS "int \fBportCount\fP"
.PP
.SS "int \fBports\fP[MAXSOCKS]"
.PP
.SS "\fBSocketEngine\fP* \fBSE\fP"
.PP
.SS "time_t \fBstartup_time\fP"
.PP
.SS "time_t \fBTIME\fP"
.PP
.SS "\fBwhowas_hash\fP \fBwhowas\fP"
.PP
.SS "int \fBWHOWAS_MAX\fP"
.PP
.SS "int \fBWHOWAS_STALE\fP"
.PP
.SH "Author"
.PP
Generated automatically by Doxygen for InspIRCd from the source code.
|