]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/inspircd.h
Extract command line option parsing to a function.
[user/henk/code/inspircd.git] / include / inspircd.h
index 9b14598e40286bbfcb86e6bf7198d6ec801c81e4..f3e718dcc5d3f5711a620bcbb39fd7c0496fa06a 100644 (file)
 
 #pragma once
 
+// If the system has a pre-C11 stdint header this must be defined in
+// order to use the numeric limit macros.
+#define __STDC_LIMIT_MACROS
+
 #include <cfloat>
 #include <climits>
 #include <cmath>
@@ -70,6 +74,7 @@ struct fakederef
 #include "dynref.h"
 #include "consolecolors.h"
 #include "cull_list.h"
+#include "serialize.h"
 #include "extensible.h"
 #include "fileutils.h"
 #include "ctables.h"
@@ -176,15 +181,6 @@ class serverstats
 class CoreExport InspIRCd
 {
  private:
-       /** Set up the signal handlers
-        */
-       void SetSignals();
-
-       /** Daemonize the ircd and close standard input/output streams
-        * @return True if the program daemonized succesfully
-        */
-       bool DaemonSeed();
-
        /** The current time, updated in the mainloop
         */
        struct timespec TIME;
@@ -196,11 +192,6 @@ class CoreExport InspIRCd
 
        ClientProtocol::RFCEvents rfcevents;
 
-       /** Check we aren't running as root, and exit if we are
-        * with exit code EXIT_STATUS_ROOT.
-        */
-       void CheckRoot();
-
  public:
 
        UIDGenerator UIDGen;
@@ -503,11 +494,11 @@ class CoreExport InspIRCd
        static unsigned long Duration(const std::string& str);
 
        /** Calculate a duration in seconds from a string in the form 1y2w3d4h6m5s
-        * @param str A string containing a time in the form 1y2w3d4h6m5s
-        * (one year, two weeks, three days, four hours, six minutes and five seconds)
-        * @param duration The location to place the parsed duration valur
-        * @return Whether the duration was a valid format or not
-        */
+        * @param str A string containing a time in the form 1y2w3d4h6m5s
+        * (one year, two weeks, three days, four hours, six minutes and five seconds)
+        * @param duration The location to place the parsed duration valur
+        * @return Whether the duration was a valid format or not
+        */
        static bool Duration(const std::string& str, unsigned long& duration);
 
        /** Determines whether a string contains a valid duration.