]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/configreader.h
Dunno why this method was static, doesnt need to be...
[user/henk/code/inspircd.git] / include / configreader.h
index 514e5e9b3834a9a8bd4d58ef80d429f6009d33e6..70b1bc800f6caa3c0effa869f4a388c1304d85fc 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
@@ -349,6 +356,17 @@ class ServerConfig : public Extensible
         */
        bool AllowHalfop;
 
+       /** If this is set to true, then mode lists (e.g
+        * MODE #chan b) are hidden from unprivileged
+        * users.
+        */
+       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.
         */
@@ -416,10 +434,9 @@ class ServerConfig : public Extensible
         */
        char HideWhoisServer[MAXBUF];
 
-       /** A list of IP addresses the server is listening
-        * on.
+       /** Set to a non empty string to obfuscate nicknames prepended to a KILL.
         */
-       char addrs[MAXBUF][255];
+       char HideKillsServer[MAXBUF];
 
        /** The MOTD file, cached in a file_cache type.
         */
@@ -443,13 +460,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
         */
@@ -643,14 +656,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);