]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/configreader.h
Add call to protocol interface to get useful info on the server map. Return a std...
[user/henk/code/inspircd.git] / include / configreader.h
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
6  * See: http://www.inspircd.org/wiki/index.php/Credits
7  *
8  * This program is free but copyrighted software; see
9  *            the file COPYING for details.
10  *
11  * ---------------------------------------------------
12  */
13
14 #ifndef INSPIRCD_CONFIGREADER
15 #define INSPIRCD_CONFIGREADER
16
17 /* handy defines */
18
19 /** Determines if a channel op is exempt from given mode m,
20  * in config of server instance s. 
21  */
22 #define CHANOPS_EXEMPT(s, m) (s->Config->ExemptChanOps[(unsigned char)m])
23
24 #include <sstream>
25 #include <string>
26 #include <vector>
27 #include <map>
28 #include "inspircd.h"
29 #include "globals.h"
30 #include "modules.h"
31 #include "socketengine.h"
32 #include "socket.h"
33
34 /* Required forward definitions */
35 class ServerConfig;
36 class InspIRCd;
37 class BufferedSocket;
38
39 /** Types of data in the core config
40  */
41 enum ConfigDataType
42 {
43         DT_NOTHING       = 0,           /* No data */
44         DT_INTEGER       = 1,           /* Integer */
45         DT_CHARPTR       = 2,           /* Char pointer */
46         DT_BOOLEAN       = 3,           /* Boolean */
47         DT_HOSTNAME      = 4,           /* Hostname syntax */
48         DT_NOSPACES      = 5,           /* No spaces */
49         DT_IPADDRESS     = 6,           /* IP address (v4, v6) */
50         DT_CHANNEL       = 7,           /* Channel name */
51         DT_ALLOW_WILD    = 64,          /* Allow wildcards/CIDR in DT_IPADDRESS */
52         DT_ALLOW_NEWLINE = 128,         /* New line characters allowed in DT_CHARPTR */
53         DT_BOOTONLY      = 256          /* Can only be set on startup, not on rehash */
54 };
55
56 /** Holds a config value, either string, integer or boolean.
57  * Callback functions receive one or more of these, either on
58  * their own as a reference, or in a reference to a deque of them.
59  * The callback function can then alter the values of the ValueItem
60  * classes to validate the settings.
61  */
62 class ValueItem
63 {
64         /** Actual data */
65         std::string v;
66  public:
67         /** Initialize with an int */
68         ValueItem(int value);
69         /** Initialize with a bool */
70         ValueItem(bool value);
71         /** Initialize with a char pointer */
72         ValueItem(const char* value);
73         /** Change value to a char pointer */
74         void Set(const char* val);
75         /** Change value to an int */
76         void Set(int value);
77         /** Get value as an int */
78         int GetInteger();
79         /** Get value as a string */
80         char* GetString();
81         /** Get value as a bool */
82         bool GetBool();
83 };
84
85 /** The base class of the container 'ValueContainer'
86  * used internally by the core to hold core values.
87  */
88 class ValueContainerBase
89 {
90  public:
91         /** Constructor */
92         ValueContainerBase() { }
93         /** Destructor */
94         virtual ~ValueContainerBase() { }
95 };
96
97 /** ValueContainer is used to contain pointers to different
98  * core values such as the server name, maximum number of
99  * clients etc.
100  * It is specialized to hold a data type, then pointed at
101  * a value in the ServerConfig class. When the value has been
102  * read and validated, the Set method is called to write the
103  * value safely in a type-safe manner.
104  */
105 template<typename T> class ValueContainer : public ValueContainerBase
106 {
107         /** Contained item */
108         T val;
109  public:
110
111         /** Initialize with nothing */
112         ValueContainer()
113         {
114                 val = NULL;
115         }
116
117         /** Initialize with a value of type T */
118         ValueContainer(T Val)
119         {
120                 val = Val;
121         }
122
123         /** Change value to type T of size s */
124         void Set(T newval, size_t s)
125         {
126                 memcpy(val, newval, s);
127         }
128 };
129
130 /** A specialization of ValueContainer to hold a pointer to a bool
131  */
132 typedef ValueContainer<bool*> ValueContainerBool;
133
134 /** A specialization of ValueContainer to hold a pointer to
135  * an unsigned int
136  */
137 typedef ValueContainer<unsigned int*> ValueContainerUInt;
138
139 /** A specialization of ValueContainer to hold a pointer to
140  * a char array.
141  */
142 typedef ValueContainer<char*> ValueContainerChar;
143
144 /** A specialization of ValueContainer to hold a pointer to
145  * an int
146  */
147 typedef ValueContainer<int*> ValueContainerInt;
148
149 /** A set of ValueItems used by multi-value validator functions
150  */
151 typedef std::deque<ValueItem> ValueList;
152
153 /** A callback for validating a single value
154  */
155 typedef bool (*Validator)(ServerConfig* conf, const char*, const char*, ValueItem&);
156 /** A callback for validating multiple value entries
157  */
158 typedef bool (*MultiValidator)(ServerConfig* conf, const char*, char**, ValueList&, int*);
159 /** A callback indicating the end of a group of entries
160  */
161 typedef bool (*MultiNotify)(ServerConfig* conf, const char*);
162
163 /** Holds a core configuration item and its callbacks
164  */
165 struct InitialConfig
166 {
167         /** Tag name */
168         const char* tag;
169         /** Value name */
170         const char* value;
171         /** Default, if not defined */
172         const char* default_value;
173         /** Value containers */
174         ValueContainerBase* val;
175         /** Data types */
176         int datatype;
177         /** Validation function */
178         Validator validation_function;
179 };
180
181 struct Deprecated
182 {
183         const char* tag;
184         const char* value;
185         const char* reason;
186 };
187
188 /** Holds a core configuration item and its callbacks
189  * where there may be more than one item
190  */
191 struct MultiConfig
192 {
193         /** Tag name */
194         const char*     tag;
195         /** One or more items within tag */
196         const char*     items[18];
197         /** One or more defaults for items within tags */
198         const char* items_default[18];
199         /** One or more data types */
200         int             datatype[18];
201         /** Initialization function */
202         MultiNotify     init_function;
203         /** Validation function */
204         MultiValidator  validation_function;
205         /** Completion function */
206         MultiNotify     finish_function;
207 };
208
209 /** A set of oper types
210  */
211 typedef std::map<irc::string,char*> opertype_t;
212
213 struct operclass_data : public Extensible
214 {
215         char* commandlist;
216         char* cmodelist;
217         char* umodelist;
218 };
219
220 /** A Set of oper classes
221  */
222 typedef std::map<irc::string, operclass_data> operclass_t;
223
224
225 /** This class holds the bulk of the runtime configuration for the ircd.
226  * It allows for reading new config values, accessing configuration files,
227  * and storage of the configuration data needed to run the ircd, such as
228  * the servername, connect classes, /ADMIN data, MOTDs and filenames etc.
229  */
230 class CoreExport ServerConfig : public Extensible
231 {
232   private:
233         /** Creator/owner pointer
234          */
235         InspIRCd* ServerInstance;
236
237         /** This variable holds the names of all
238          * files included from the main one. This
239          * is used to make sure that no files are
240          * recursively included.
241          */
242         std::vector<std::string> include_stack;
243
244         /** This private method processes one line of
245          * configutation, appending errors to errorstream
246          * and setting error if an error has occured.
247          */
248         bool ParseLine(ConfigDataHash &target, std::string &line, long &linenumber, std::ostringstream &errorstream);
249
250         /** Check that there is only one of each configuration item
251          */
252         bool CheckOnce(const char* tag, ConfigDataHash &newconf);
253
254  public:
255
256         /** Process an include executable directive
257          */
258         bool DoPipe(ConfigDataHash &target, const std::string &file, std::ostringstream &errorstream);
259
260         /** Process an include file directive
261          */
262         bool DoInclude(ConfigDataHash &target, const std::string &file, std::ostringstream &errorstream);
263
264         User* RehashUser;
265
266         std::string RehashParameter;
267
268         std::ostringstream errstr;
269
270         ConfigDataHash newconfig;
271
272         std::map<std::string, std::istream*> IncludedFiles;
273
274         std::map<std::string, bool> CompletedFiles;
275
276         size_t TotalDownloaded;
277         size_t FileErrors;
278
279         /** Used to indicate who we announce invites to on a channel */
280         enum InviteAnnounceState { INVITE_ANNOUNCE_NONE, INVITE_ANNOUNCE_ALL, INVITE_ANNOUNCE_OPS, INVITE_ANNOUNCE_DYNAMIC };
281
282         /** Pointer to function that validates dns server addresses (can be changed depending on platform) */
283         Validator DNSServerValidator;
284
285         InspIRCd* GetInstance();
286
287         int DoDownloads();
288           
289         /** This holds all the information in the config file,
290          * it's indexed by tag name to a vector of key/values.
291          */
292         ConfigDataHash config_data;
293
294         /** Max number of WhoWas entries per user.
295          */
296         int WhoWasGroupSize;
297
298         /** Max number of cumulative user-entries in WhoWas.
299          *  When max reached and added to, push out oldest entry FIFO style.
300          */
301         int WhoWasMaxGroups;
302
303         /** Max seconds a user is kept in WhoWas before being pruned.
304          */
305         int WhoWasMaxKeep;
306
307         /** Holds the server name of the local server
308          * as defined by the administrator.
309          */
310         char ServerName[MAXBUF];
311
312         /** Notice to give to users when they are Xlined
313          */
314         char MoronBanner[MAXBUF];
315         
316         /* Holds the network name the local server
317          * belongs to. This is an arbitary field defined
318          * by the administrator.
319          */
320         char Network[MAXBUF];
321
322         /** Holds the description of the local server
323          * as defined by the administrator.
324          */
325         char ServerDesc[MAXBUF];
326
327         /** Holds the admin's name, for output in
328          * the /ADMIN command.
329          */
330         char AdminName[MAXBUF];
331
332         /** Holds the email address of the admin,
333          * for output in the /ADMIN command.
334          */
335         char AdminEmail[MAXBUF];
336
337         /** Holds the admin's nickname, for output
338          * in the /ADMIN command
339          */
340         char AdminNick[MAXBUF];
341
342         /** The admin-configured /DIE password
343          */
344         char diepass[MAXBUF];
345
346         /** The admin-configured /RESTART password
347          */
348         char restartpass[MAXBUF];
349
350         /** The hash method for *BOTH* the die and restart passwords.
351          */
352         char powerhash[MAXBUF];
353
354         /** The pathname and filename of the message of the
355          * day file, as defined by the administrator.
356          */
357         char motd[MAXBUF];
358
359         /** The pathname and filename of the rules file,
360          * as defined by the administrator.
361          */
362         char rules[MAXBUF];
363
364         /** The quit prefix in use, or an empty string
365          */
366         char PrefixQuit[MAXBUF];
367
368         /** The quit suffix in use, or an empty string
369          */
370         char SuffixQuit[MAXBUF];
371
372         /** The fixed quit message in use, or an empty string
373          */
374         char FixedQuit[MAXBUF];
375
376         /** The part prefix in use, or an empty string
377          */
378         char PrefixPart[MAXBUF];
379
380         /** The part suffix in use, or an empty string
381          */
382         char SuffixPart[MAXBUF];
383
384         /** The fixed part message in use, or an empty string
385          */
386         char FixedPart[MAXBUF];
387
388         /** The last string found within a <die> tag, or
389          * an empty string.
390          */
391         char DieValue[MAXBUF];
392
393         /** The DNS server to use for DNS queries
394          */
395         char DNSServer[MAXBUF];
396
397         /** This variable contains a space-seperated list
398          * of commands which are disabled by the
399          * administrator of the server for non-opers.
400          */
401         char DisabledCommands[MAXBUF];
402
403         /** The full path to the modules directory.
404          * This is either set at compile time, or
405          * overridden in the configuration file via
406          * the <options> tag.
407          */
408         char ModPath[1024];
409
410         /** The full pathname to the executable, as
411          * given in argv[0] when the program starts.
412          */
413         char MyExecutable[1024];
414
415         /** The file handle of the logfile. If this
416          * value is NULL, the log file is not open,
417          * probably due to a permissions error on
418          * startup (this should not happen in normal
419          * operation!).
420          */
421         FILE *log_file;
422
423         /** If this value is true, the owner of the
424          * server specified -nofork on the command
425          * line, causing the daemon to stay in the
426          * foreground.
427          */
428         bool nofork;
429         
430         /** If this value if true then all log
431          * messages will be output, regardless of
432          * the level given in the config file.
433          * This is set with the -debug commandline
434          * option.
435          */
436         bool forcedebug;
437         
438         /** If this is true then log output will be
439          * written to the logfile. This is the default.
440          * If you put -nolog on the commandline then
441          * the logfile will not be written.
442          * This is meant to be used in conjunction with
443          * -debug for debugging without filling up the
444          * hard disk.
445          */
446         bool writelog;
447
448         /** If this value is true, halfops have been
449          * enabled in the configuration file.
450          */
451         bool AllowHalfop;
452
453         /** If this is set to true, then mode lists (e.g
454          * MODE #chan b) are hidden from unprivileged
455          * users.
456          */
457         bool HideModeLists[256];
458
459         /** If this is set to true, then channel operators
460          * are exempt from this channel mode. Used for +Sc etc.
461          */
462         bool ExemptChanOps[256];
463
464         /** The number of seconds the DNS subsystem
465          * will wait before timing out any request.
466          */
467         int dns_timeout;
468
469         /** The size of the read() buffer in the user
470          * handling code, used to read data into a user's
471          * recvQ.
472          */
473         int NetBufferSize;
474
475         /** The value to be used for listen() backlogs
476          * as default.
477          */
478         int MaxConn;
479
480         /** The soft limit value assigned to the irc server.
481          * The IRC server will not allow more than this
482          * number of local users.
483          */
484         unsigned int SoftLimit;
485
486         /** Maximum number of targets for a multi target command
487          * such as PRIVMSG or KICK
488          */
489         unsigned int MaxTargets;
490
491         /** The maximum number of /WHO results allowed
492          * in any single /WHO command.
493          */
494         int MaxWhoResults;
495
496         /** True if the DEBUG loglevel is selected.
497          */
498         int debugging;
499
500         /** How many seconds to wait before exiting
501          * the program when /DIE is correctly issued.
502          */
503         int DieDelay;
504
505         /** True if we're going to hide netsplits as *.net *.split for non-opers
506          */
507         bool HideSplits;
508
509         /** True if we're going to hide ban reasons for non-opers (e.g. G-Lines,
510          * K-Lines, Z-Lines)
511          */
512         bool HideBans;
513
514         /** Announce invites to the channel with a server notice
515          */
516         InviteAnnounceState AnnounceInvites;
517
518         /** If this is enabled then operators will
519          * see invisible (+i) channels in /whois.
520          */
521         bool OperSpyWhois;
522
523         /** Set to a non-empty string to obfuscate the server name of users in WHOIS
524          */
525         char HideWhoisServer[MAXBUF];
526
527         /** Set to a non empty string to obfuscate nicknames prepended to a KILL.
528          */
529         char HideKillsServer[MAXBUF];
530
531         /** The MOTD file, cached in a file_cache type.
532          */
533         file_cache MOTD;
534
535         /** The RULES file, cached in a file_cache type.
536          */
537         file_cache RULES;
538
539         /** The full pathname and filename of the PID
540          * file as defined in the configuration.
541          */
542         char PID[1024];
543
544         /** The connect classes in use by the IRC server.
545          */
546         ClassVector Classes;
547
548         /** A list of the classes for listening client ports
549          */
550         std::vector<ListenSocket*> ports;
551
552         /** socket objects that are attached to by modules
553          */
554         std::map<BufferedSocket*, Module*> SocketIOHookModule;
555
556         /** The 005 tokens of this server (ISUPPORT)
557          * populated/repopulated upon loading or unloading
558          * modules.
559          */
560         std::string data005;
561
562         /** isupport strings
563          */
564         std::vector<std::string> isupport;
565
566         /** STATS characters in this list are available
567          * only to operators.
568          */
569         char UserStats[MAXBUF];
570         
571         /** The path and filename of the ircd.log file
572          */
573         std::string logpath;
574
575         /** Default channel modes
576          */
577         char DefaultModes[MAXBUF];
578
579         /** Custom version string, which if defined can replace the system info in VERSION.
580          */
581         char CustomVersion[MAXBUF];
582
583         /** List of u-lined servers
584          */
585         std::map<irc::string, bool> ulines;
586
587         /** Max banlist sizes for channels (the std::string is a glob)
588          */
589         std::map<std::string, int> maxbans;
590
591         /** Directory where the inspircd binary resides
592          */
593         std::string MyDir;
594
595         /** If set to true, no user DNS lookups are to be performed
596          */
597         bool NoUserDns;
598
599         /** If set to true, provide syntax hints for unknown commands
600          */
601         bool SyntaxHints;
602
603         /** If set to true, users appear to quit then rejoin when their hosts change.
604          * This keeps clients synchronized properly.
605          */
606         bool CycleHosts;
607
608         /** If set to true, prefixed channel NOTICEs and PRIVMSGs will have the prefix
609          *  added to the outgoing text for undernet style msg prefixing.
610          */
611         bool UndernetMsgPrefix;
612
613         /** If set to true, the full nick!user@host will be shown in the TOPIC command
614          * for who set the topic last. If false, only the nick is shown.
615          */
616         bool FullHostInTopic;
617
618         /** All oper type definitions from the config file
619          */
620         opertype_t opertypes;
621
622         /** All oper class definitions from the config file
623          */
624         operclass_t operclass;
625
626         /** Saved argv from startup
627          */
628         char** argv;
629
630         /** Saved argc from startup
631          */
632         int argc;
633
634         /** Max channels per user
635          */
636         unsigned int MaxChans;
637
638         /** Oper max channels per user
639          */
640         unsigned int OperMaxChans;
641
642         /** TS6-like server ID.
643          * NOTE: 000...999 are usable for InspIRCd servers. This
644          * makes code simpler. 0AA, 1BB etc with letters are reserved
645          * for services use.
646          */
647         char sid[MAXBUF];
648
649         /** True if we have been told to run the testsuite from the commandline,
650          * rather than entering the mainloop.
651          */
652         bool TestSuite;
653
654         /** Construct a new ServerConfig
655          */
656         ServerConfig(InspIRCd* Instance);
657
658         /** Clears the include stack in preperation for a Read() call.
659          */
660         void ClearStack();
661
662         /** Get server ID as string with required leading zeroes
663          */
664         std::string GetSID();
665
666         /** Update the 005 vector
667          */
668         void Update005();
669
670         /** Send the 005 numerics (ISUPPORT) to a user
671          */
672         void Send005(User* user);
673
674         /** Read the entire configuration into memory
675          * and initialize this class. All other methods
676          * should be used only by the core.
677          */
678         void Read(bool bail, User* user);
679
680         /** Read a file into a file_cache object
681          */
682         bool ReadFile(file_cache &F, const char* fname);
683
684         /** Report a configuration error given in errormessage.
685          * @param bail If this is set to true, the error is sent to the console, and the program exits
686          * @param user If this is set to a non-null value, and bail is false, the errors are spooled to
687          * this user as SNOTICEs.
688          * If the parameter is NULL, the messages are spooled to all opers.
689          */
690         void ReportConfigError(const std::string &errormessage, bool bail, User* user);
691
692         /** Load 'filename' into 'target', with the new config parser everything is parsed into
693          * tag/key/value at load-time rather than at read-value time.
694          */
695         bool LoadConf(ConfigDataHash &target, FILE* &conf, const char* filename, std::ostringstream &errorstream);
696
697         /** Load 'filename' into 'target', with the new config parser everything is parsed into
698          * tag/key/value at load-time rather than at read-value time.
699          */
700         bool LoadConf(ConfigDataHash &target, FILE* &conf, const std::string &filename, std::ostringstream &errorstream);
701         
702         /* Both these return true if the value existed or false otherwise */
703         
704         /** Writes 'length' chars into 'result' as a string
705          */
706         bool ConfValue(ConfigDataHash &target, const char* tag, const char* var, int index, char* result, int length, bool allow_linefeeds = false);
707         /** Writes 'length' chars into 'result' as a string
708          */
709         bool ConfValue(ConfigDataHash &target, const char* tag, const char* var, const char* default_value, int index, char* result, int length, bool allow_linefeeds = false);
710
711         /** Writes 'length' chars into 'result' as a string
712          */
713         bool ConfValue(ConfigDataHash &target, const std::string &tag, const std::string &var, int index, std::string &result, bool allow_linefeeds = false);
714         /** Writes 'length' chars into 'result' as a string
715          */
716         bool ConfValue(ConfigDataHash &target, const std::string &tag, const std::string &var, const std::string &default_value, int index, std::string &result, bool allow_linefeeds = false);
717         
718         /** Tries to convert the value to an integer and write it to 'result'
719          */
720         bool ConfValueInteger(ConfigDataHash &target, const char* tag, const char* var, int index, int &result);
721         /** Tries to convert the value to an integer and write it to 'result'
722          */
723         bool ConfValueInteger(ConfigDataHash &target, const char* tag, const char* var, const char* default_value, int index, int &result);
724         /** Tries to convert the value to an integer and write it to 'result'
725          */
726         bool ConfValueInteger(ConfigDataHash &target, const std::string &tag, const std::string &var, int index, int &result);
727         /** Tries to convert the value to an integer and write it to 'result'
728          */
729         bool ConfValueInteger(ConfigDataHash &target, const std::string &tag, const std::string &var, const std::string &default_value, int index, int &result);
730         
731         /** Returns true if the value exists and has a true value, false otherwise
732          */
733         bool ConfValueBool(ConfigDataHash &target, const char* tag, const char* var, int index);
734         /** Returns true if the value exists and has a true value, false otherwise
735          */
736         bool ConfValueBool(ConfigDataHash &target, const char* tag, const char* var, const char* default_value, int index);
737         /** Returns true if the value exists and has a true value, false otherwise
738          */
739         bool ConfValueBool(ConfigDataHash &target, const std::string &tag, const std::string &var, int index);
740         /** Returns true if the value exists and has a true value, false otherwise
741          */
742         bool ConfValueBool(ConfigDataHash &target, const std::string &tag, const std::string &var, const std::string &default_value, int index);
743         
744         /** Returns the number of occurences of tag in the config file
745          */
746         int ConfValueEnum(ConfigDataHash &target, const char* tag);
747         /** Returns the number of occurences of tag in the config file
748          */
749         int ConfValueEnum(ConfigDataHash &target, const std::string &tag);
750         
751         /** Returns the numbers of vars inside the index'th 'tag in the config file
752          */
753         int ConfVarEnum(ConfigDataHash &target, const char* tag, int index);
754         /** Returns the numbers of vars inside the index'th 'tag in the config file
755          */
756         int ConfVarEnum(ConfigDataHash &target, const std::string &tag, int index);
757
758         void ValidateHostname(const char* p, const std::string &tag, const std::string &val);
759
760         void ValidateIP(const char* p, const std::string &tag, const std::string &val, bool wild);
761
762         void ValidateNoSpaces(const char* p, const std::string &tag, const std::string &val);
763
764         /** Get a pointer to the module which has hooked the given BufferedSocket class.
765          * @parameter port Port number
766          * @return Returns a pointer to the hooking module, or NULL
767          */
768         Module* GetIOHook(BufferedSocket* is);
769
770         /** Hook a module to an BufferedSocket class, so that it can receive notifications
771          * of low-level socket activity.
772          * @param iomod The module to hook to the socket
773          * @param is The BufferedSocket to attach to
774          * @return True if the hook was successful.
775          */
776         bool AddIOHook(Module* iomod, BufferedSocket* is);
777
778         /** Delete a module hook from an BufferedSocket.
779          * @param is The BufferedSocket to detatch from.
780          * @return True if the unhook was successful
781          */
782         bool DelIOHook(BufferedSocket* is);
783
784         /** Returns the fully qualified path to the inspircd directory
785          * @return The full program directory
786          */
787         std::string GetFullProgDir();
788
789         /** Returns true if a directory is valid (within the modules directory).
790          * @param dirandfile The directory and filename to check
791          * @return True if the directory is valid
792          */
793         static bool DirValid(const char* dirandfile);
794
795         /** Clean a filename, stripping the directories (and drives) from string.
796          * @param name Directory to tidy
797          * @return The cleaned filename
798          */
799         static char* CleanFilename(char* name);
800
801         /** Check if a file exists.
802          * @param file The full path to a file
803          * @return True if the file exists and is readable.
804          */
805         static bool FileExists(const char* file);
806         
807 };
808
809 /** Initialize the disabled commands list
810  */
811 CoreExport bool InitializeDisabledCommands(const char* data, InspIRCd* ServerInstance);
812
813 /** Initialize the oper types
814  */
815 bool InitTypes(ServerConfig* conf, const char* tag);
816
817 /** Initialize the oper classes
818  */
819 bool InitClasses(ServerConfig* conf, const char* tag);
820
821 /** Initialize an oper type 
822  */
823 bool DoType(ServerConfig* conf, const char* tag, char** entries, ValueList &values, int* types);
824
825 /** Initialize an oper class
826  */
827 bool DoClass(ServerConfig* conf, const char* tag, char** entries, ValueList &values, int* types);
828
829 /** Finish initializing the oper types and classes
830  */
831 bool DoneClassesAndTypes(ServerConfig* conf, const char* tag);
832
833
834
835 /** Initialize x line
836  */
837 bool InitXLine(ServerConfig* conf, const char* tag);
838  
839 /** Add a config-defined zline
840  */
841 bool DoZLine(ServerConfig* conf, const char* tag, char** entries, ValueList &values, int* types);
842
843 /** Add a config-defined qline
844  */
845 bool DoQLine(ServerConfig* conf, const char* tag, char** entries, ValueList &values, int* types);
846
847 /** Add a config-defined kline
848  */
849 bool DoKLine(ServerConfig* conf, const char* tag, char** entries, ValueList &values, int* types);
850
851 /** Add a config-defined eline
852  */
853 bool DoELine(ServerConfig* conf, const char* tag, char** entries, ValueList &values, int* types);
854
855
856
857
858 #endif
859