]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/inspircd_io.h
Fixes to make this actually WORK.
[user/henk/code/inspircd.git] / include / inspircd_io.h
index 62086f2658767dcba1f74fd3ca1c832e7e9bab4c..19fce08471e1fa31600ccb20e96061ffa9e6c2b8 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  Inspire is copyright (C) 2002-2005 ChatSpike-Dev.
+ *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
  *                       E-mail:
  *                <brain@chatspike.net>
  *               <Craig@chatspike.net>
@@ -22,6 +22,7 @@
 #include <vector>
 #include "inspircd.h"
 #include "globals.h"
+#include "modules.h"
 
 /** Flags for use with log()
  */
@@ -60,6 +61,10 @@ class ServerConfig : public classbase
         */
        std::string ConfProcess(char* buffer, long linenumber, std::stringstream* errorstream, bool &error, std::string filename);
 
+       /** Check that there is only one of each configuration item
+        */
+       bool CheckOnce(char* tag, bool bail, userrec* user);
+
   public:
 
        /** Holds the server name of the local server
@@ -246,6 +251,41 @@ class ServerConfig : public classbase
         */
        std::vector<std::string> module_names;
 
+       /** A list of ports which the server is listening on
+        */
+       int ports[255];
+
+       /** Boolean sets of which modules implement which functions
+        */
+       char implement_lists[255][255];
+
+       /** Global implementation list
+        */
+       char global_implementation[255];
+
+       /** A list of ports claimed by IO Modules
+        */
+       std::map<int,Module*> IOHookModule;
+
+       /** The 005 tokens of this server (ISUPPORT)
+        * populated/repopulated upon loading or unloading
+        * modules.
+        */
+       std::string data005;
+
+       /** STATS characters in this list are available
+        * only to operators.
+        */
+       char OperOnlyStats[MAXBUF];
+
+       /** The path and filename of the ircd.log file
+        */
+       std::string logpath;
+
+       /** Custom version string, which if defined can replace the system info in VERSION.
+        */
+       char CustomVersion[MAXBUF];
+
        ServerConfig();
 
        /** Clears the include stack in preperation for
@@ -265,15 +305,20 @@ class ServerConfig : public classbase
        int ConfValueEnum(char* tag,std::stringstream *config);
        int EnumConf(std::stringstream *config_f,const char* tag);
        int EnumValues(std::stringstream *config, const char* tag, int index);
+       Module* GetIOHook(int port);
+       bool AddIOHook(int port, Module* iomod);
+       bool DelIOHook(int port);
 };
 
 
 void Exit (int); 
 void Start (void); 
+void SetSignals();
 int DaemonSeed (void); 
 bool FileExists (const char* file);
 int OpenTCPSocket (void); 
 int BindSocket (int sockfd, struct sockaddr_in client, struct sockaddr_in server, int port, char* addr);
 void WritePID(std::string filename);
+int BindPorts();
 
 #endif