]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/configreader.h
Sexeger!
[user/henk/code/inspircd.git] / include / configreader.h
index eefa359c9e523567a90d3643a05afce4350620a4..4d5435b1ca43de55f5a4314c34083d0301678849 100644 (file)
 #ifndef INSPIRCD_CONFIGREADER
 #define INSPIRCD_CONFIGREADER
 
+/* handy defines */
+
+/** Determines if a channel op is exempt from given mode m,
+ * in config of server instance s. 
+ */
+#define CHANOPS_EXEMPT(s, m) (s->Config->ExemptChanOps[(unsigned char)m])
+
 #include <sstream>
 #include <string>
 #include <vector>
@@ -173,7 +180,7 @@ typedef std::map<irc::string,char*> operclass_t;
  * and storage of the configuration data needed to run the ircd, such as
  * the servername, connect classes, /ADMIN data, MOTDs and filenames etc.
  */
-class ServerConfig : public Extensible
+class CoreExport ServerConfig : public Extensible
 {
   private:
        /** Creator/owner
@@ -227,6 +234,10 @@ class ServerConfig : public Extensible
         * as defined by the administrator.
         */
        char ServerName[MAXBUF];
+
+       /** Notice to give to users when they are Xlined
+        */
+       char MoronBanner[MAXBUF];
        
        /* Holds the network name the local server
         * belongs to. This is an arbitary field defined
@@ -355,6 +366,11 @@ class ServerConfig : public Extensible
         */
        bool HideModeLists[256];
 
+       /** If this is set to true, then channel operators
+        * are exempt from this channel mode. Used for +Sc etc.
+        */
+       bool ExemptChanOps[256];
+
        /** The number of seconds the DNS subsystem
         * will wait before timing out any request.
         */
@@ -426,11 +442,6 @@ class ServerConfig : public Extensible
         */
        char HideKillsServer[MAXBUF];
 
-       /** A list of IP addresses the server is listening
-        * on.
-        */
-       char addrs[MAXBUF][255];
-
        /** The MOTD file, cached in a file_cache type.
         */
        file_cache MOTD;
@@ -453,13 +464,9 @@ class ServerConfig : public Extensible
         */
        std::vector<std::string> module_names;
 
-       /** A list of ports which the server is listening on
-        */
-       int ports[255];
-
-       /** A list of the file descriptors for the listening client ports
+       /** A list of the classes for listening client ports
         */
-       ListenSocket* openSockfd[255];
+       std::vector<ListenSocket*> ports;
 
        /** Boolean sets of which modules implement which functions
         */
@@ -491,6 +498,10 @@ class ServerConfig : public Extensible
         */
        std::string logpath;
 
+       /** Default channel modes
+        */
+       char DefaultModes[MAXBUF];
+
        /** Custom version string, which if defined can replace the system info in VERSION.
         */
        char CustomVersion[MAXBUF];
@@ -501,7 +512,7 @@ class ServerConfig : public Extensible
 
        /** Max banlist sizes for channels (the std::string is a glob)
         */
-       std::map<std::string,int> maxbans;
+       std::map<std::string, int> maxbans;
 
        /** Directory where the inspircd binary resides
         */
@@ -653,14 +664,14 @@ class ServerConfig : public Extensible
        bool AddIOHook(Module* iomod, InspSocket* is);
        bool DelIOHook(InspSocket* is);
 
-       static std::string GetFullProgDir(char** argv, int argc);
+       std::string GetFullProgDir();
        static bool DirValid(const char* dirandfile);
        static char* CleanFilename(char* name);
        static bool FileExists(const char* file);
        
 };
 
-bool InitializeDisabledCommands(const char* data, InspIRCd* ServerInstance);
+CoreExport bool InitializeDisabledCommands(const char* data, InspIRCd* ServerInstance);
 
 bool InitTypes(ServerConfig* conf, const char* tag);
 bool InitClasses(ServerConfig* conf, const char* tag);