1 .TH "modules.h" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
9 \fC#include 'dynamic.h'\fP
11 \fC#include 'base.h'\fP
13 \fC#include 'ctables.h'\fP
15 \fC#include 'socket.h'\fP
17 \fC#include <string>\fP
19 \fC#include <deque>\fP
21 \fC#include <sstream>\fP
28 .RI "class \fBVersion\fP"
30 .RI "\fIHolds a module's Version information The four members (set by the constructor only) indicate details as to the version number of a module. \fP"
32 .RI "class \fBAdmin\fP"
34 .RI "\fIHolds /ADMIN data This class contains the admin details of the local server. \fP"
36 .RI "class \fBModuleMessage\fP"
38 .RI "\fIThe ModuleMessage class is the base class of \fBRequest\fP and \fBEvent\fP This class is used to represent a basic data structure which is passed between modules for safe inter-module communications. \fP"
40 .RI "class \fBRequest\fP"
42 .RI "\fIThe Request class is a unicast message directed at a given module. \fP"
44 .RI "class \fBEvent\fP"
46 .RI "\fIThe Event class is a unicast message directed at all modules. \fP"
48 .RI "class \fBExtMode\fP"
50 .RI "\fIHolds an extended mode's details. \fP"
52 .RI "class \fBModule\fP"
54 .RI "\fIBase class for all \fBInspIRCd\fP modules This class is the base class for \fBInspIRCd\fP modules. \fP"
56 .RI "class \fBServer\fP"
58 .RI "\fIAllows server output and query functions This class contains methods which allow a module to query the state of the irc server, and produce output to users and other servers. \fP"
60 .RI "class \fBConfigReader\fP"
62 .RI "\fIAllows reading of values from configuration files This class allows a module to read from either the main configuration file (inspircd.conf) or from a module-specified configuration file. \fP"
64 .RI "class \fBFileReader\fP"
66 .RI "\fICaches a text file into memory and can be used to retrieve lines from it. \fP"
68 .RI "class \fBModuleFactory\fP"
70 .RI "\fIInstantiates classes inherited from \fBModule\fP This class creates a class inherited from type \fBModule\fP, using new. \fP"
76 .RI "#define \fBDEBUG\fP 10"
78 .RI "\fIlog levels \fP"
80 .RI "#define \fBVERBOSE\fP 20"
83 .RI "#define \fBDEFAULT\fP 30"
86 .RI "#define \fBSPARSE\fP 40"
89 .RI "#define \fBNONE\fP 50"
92 .RI "#define \fBMT_CHANNEL\fP 1"
94 .RI "\fIUsed with OnExtendedMode() method of modules. \fP"
96 .RI "#define \fBMT_CLIENT\fP 2"
99 .RI "#define \fBMT_SERVER\fP 3"
102 .RI "#define \fBACR_DEFAULT\fP 0"
104 .RI "\fIUsed with OnAccessCheck() method of modules. \fP"
106 .RI "#define \fBACR_DENY\fP 1"
109 .RI "#define \fBACR_ALLOW\fP 2"
112 .RI "#define \fBAC_KICK\fP 0"
115 .RI "#define \fBAC_DEOP\fP 1"
118 .RI "#define \fBAC_OP\fP 2"
121 .RI "#define \fBAC_VOICE\fP 3"
124 .RI "#define \fBAC_DEVOICE\fP 4"
127 .RI "#define \fBAC_HALFOP\fP 5"
130 .RI "#define \fBAC_DEHALFOP\fP 6"
133 .RI "#define \fBAC_INVITE\fP 7"
136 .RI "#define \fBAC_GENERAL_MODE\fP 8"
139 .RI "#define \fBVF_STATIC\fP 1"
141 .RI "\fIUsed to define a set of behavior bits for a module. \fP"
143 .RI "#define \fBVF_VENDOR\fP 2"
146 .RI "#define \fBVF_SERVICEPROVIDER\fP 4"
149 .RI "#define \fBVF_COMMON\fP 8"
152 .RI "#define \fBFOREACH_MOD\fP for (int _i = 0; _i <= \fBMODCOUNT\fP; _i++) modules[_i]->"
155 .RI "#define \fBFOREACH_RESULT\fP(x)"
158 .RI "#define \fBFD_MAGIC_NUMBER\fP -42"
161 .RI "#define \fBCONF_NOT_A_NUMBER\fP 0x000010"
164 .RI "#define \fBCONF_NOT_UNSIGNED\fP 0x000080"
167 .RI "#define \fBCONF_VALUE_NOT_FOUND\fP 0x000100"
170 .RI "#define \fBCONF_FILE_NOT_FOUND\fP 0x000200"
177 .RI "typedef std::deque< \fBstd::string\fP > \fBfile_cache\fP"
179 .RI "\fILow level definition of a \fBFileReader\fP classes file cache area. \fP"
181 .RI "typedef \fBfile_cache\fP \fBstring_list\fP"
184 .RI "typedef std::deque< \fBuserrec\fP * > \fBchanuserlist\fP"
186 .RI "\fIHolds a list of users in a channel. \fP"
188 .RI "typedef DLLFactory< \fBModuleFactory\fP > \fBircd_module\fP"
195 .RI "void \fBcreatecommand\fP (char *cmd, \fBhandlerfunc\fP f, char flags, int minparams, char *source)"
198 .RI "void \fBserver_mode\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
201 .RI "bool \fBModeDefined\fP (char c, int i)"
204 .RI "bool \fBModeDefinedOper\fP (char c, int i)"
207 .RI "int \fBModeDefinedOn\fP (char c, int i)"
210 .RI "int \fBModeDefinedOff\fP (char c, int i)"
213 .RI "void \fBModeMakeList\fP (char modechar)"
216 .RI "bool \fBModeIsListMode\fP (char modechar, int type)"
219 .SH "Define Documentation"
221 .SS "#define AC_DEHALFOP 6"
223 Definition at line 46 of file modules.h.
224 .SS "#define AC_DEOP 1"
226 Definition at line 41 of file modules.h.
227 .SS "#define AC_DEVOICE 4"
229 Definition at line 44 of file modules.h.
230 .SS "#define AC_GENERAL_MODE 8"
232 Definition at line 48 of file modules.h.
233 .SS "#define AC_HALFOP 5"
235 Definition at line 45 of file modules.h.
236 .SS "#define AC_INVITE 7"
238 Definition at line 47 of file modules.h.
239 .SS "#define AC_KICK 0"
241 Definition at line 40 of file modules.h.
243 Referenced by kick_channel().
244 .SS "#define AC_OP 2"
246 Definition at line 42 of file modules.h.
247 .SS "#define AC_VOICE 3"
249 Definition at line 43 of file modules.h.
250 .SS "#define ACR_ALLOW 2"
252 Definition at line 39 of file modules.h.
253 .SS "#define ACR_DEFAULT 0"
255 Used with OnAccessCheck() method of modules.
257 Definition at line 37 of file modules.h.
259 Referenced by kick_channel(), and Module::OnAccessCheck().
260 .SS "#define ACR_DENY 1"
262 Definition at line 38 of file modules.h.
264 Referenced by kick_channel().
265 .SS "#define CONF_FILE_NOT_FOUND 0x000200"
267 Definition at line 1523 of file modules.h.
269 Referenced by ConfigReader::ConfigReader().
270 .SS "#define CONF_NOT_A_NUMBER 0x000010"
272 Definition at line 1520 of file modules.h.
274 Referenced by ConfigReader::ReadInteger().
275 .SS "#define CONF_NOT_UNSIGNED 0x000080"
277 Definition at line 1521 of file modules.h.
279 Referenced by ConfigReader::ReadInteger().
280 .SS "#define CONF_VALUE_NOT_FOUND 0x000100"
282 Definition at line 1522 of file modules.h.
284 Referenced by ConfigReader::ReadFlag(), ConfigReader::ReadInteger(), and ConfigReader::ReadValue().
285 .SS "#define DEBUG 10"
289 Definition at line 23 of file modules.h.
290 .SS "#define DEFAULT 30"
292 Definition at line 25 of file modules.h.
293 .SS "#define FD_MAGIC_NUMBER -42"
295 Definition at line 101 of file modules.h.
297 Referenced by Server::PseudoToUser(), and Server::UserToPseudo().
298 .SS "#define FOREACH_MOD for (int _i = 0; _i <= \fBMODCOUNT\fP; _i++) modules[_i]->"
300 Definition at line 81 of file modules.h.
302 Referenced by del_channel(), ForceChan(), kick_channel(), and Event::Send().
303 .SS "#define FOREACH_RESULT(x)"
309 for (int _i = 0; _i <= MODCOUNT; _i++) { \
310 int res = modules[_i]->x ; \
319 Definition at line 89 of file modules.h.
321 Referenced by add_channel(), and kick_channel().
322 .SS "#define MT_CHANNEL 1"
324 Used with OnExtendedMode() method of modules.
326 Definition at line 31 of file modules.h.
328 Referenced by Server::AddExtendedListMode(), and ModeMakeList().
329 .SS "#define MT_CLIENT 2"
331 Definition at line 32 of file modules.h.
333 Referenced by Server::AddExtendedMode().
334 .SS "#define MT_SERVER 3"
336 Definition at line 33 of file modules.h.
338 Referenced by Server::AddExtendedMode().
339 .SS "#define NONE 50"
341 Definition at line 27 of file modules.h.
342 .SS "#define SPARSE 40"
344 Definition at line 26 of file modules.h.
345 .SS "#define VERBOSE 20"
347 Definition at line 24 of file modules.h.
348 .SS "#define VF_COMMON 8"
350 Definition at line 55 of file modules.h.
351 .SS "#define VF_SERVICEPROVIDER 4"
353 Definition at line 54 of file modules.h.
354 .SS "#define VF_STATIC 1"
356 Used to define a set of behavior bits for a module.
358 Definition at line 52 of file modules.h.
359 .SS "#define VF_VENDOR 2"
361 Definition at line 53 of file modules.h.
363 Referenced by Module::GetVersion().
364 .SH "Typedef Documentation"
366 .SS "typedef std::deque<\fBuserrec\fP*> \fBchanuserlist\fP"
368 Holds a list of users in a channel.
370 Definition at line 74 of file modules.h.
371 .SS "typedef std::deque<\fBstd::string\fP> \fBfile_cache\fP"
373 Low level definition of a \fBFileReader\fP classes file cache area.
375 Definition at line 65 of file modules.h.
376 .SS "typedef DLLFactory<\fBModuleFactory\fP> \fBircd_module\fP"
378 Definition at line 1689 of file modules.h.
379 .SS "typedef \fBfile_cache\fP \fBstring_list\fP"
381 Definition at line 70 of file modules.h.
382 .SH "Function Documentation"
384 .SS "void createcommand (char * cmd, \fBhandlerfunc\fP f, char flags, int minparams, char * source)"
386 Referenced by Server::AddCommand().
387 .SS "bool ModeDefined (char c, int i)"
389 Definition at line 71 of file modules.cpp.
393 Referenced by DoAddExtendedMode().
397 73 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
399 75 if ((i->modechar == modechar) && (i->type == type))
408 .SS "int ModeDefinedOff (char c, int i)"
410 Definition at line 121 of file modules.cpp.
416 123 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
418 125 if ((i->modechar == modechar) && (i->type == type))
420 127 return i->params_when_off;
427 .SS "int ModeDefinedOn (char c, int i)"
429 Definition at line 108 of file modules.cpp.
435 110 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
437 112 if ((i->modechar == modechar) && (i->type == type))
439 114 return i->params_when_on;
446 .SS "bool ModeDefinedOper (char c, int i)"
448 Definition at line 95 of file modules.cpp.
454 97 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
456 99 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
465 .SS "bool ModeIsListMode (char modechar, int type)"
467 Definition at line 83 of file modules.cpp.
473 85 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
475 87 if ((i->modechar == modechar) && (i->type == type) && (i->list == true))
484 .SS "void ModeMakeList (char modechar)"
486 Definition at line 144 of file modules.cpp.
488 References EMode, and MT_CHANNEL.
490 Referenced by Server::AddExtendedListMode().
494 146 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
496 148 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
506 .SS "void server_mode (char ** parameters, int pcnt, \fBuserrec\fP * user)"
510 Generated automatically by Doxygen for InspIRCd from the source code.