]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/inspircd.h
Pass the Extensible container to ExtensionItem::free().
[user/henk/code/inspircd.git] / include / inspircd.h
index 95da70e54321a011ce8e68930afc35c8d352c923..00093e52ba07fbbd33f0ef3d79fd87f7fd3b3fed 100644 (file)
@@ -25,6 +25,7 @@
 
 #pragma once
 
+#include <cfloat>
 #include <climits>
 #include <cmath>
 #include <csignal>
@@ -49,6 +50,7 @@
 #include "compat.h"
 #include "aligned_storage.h"
 #include "typedefs.h"
+#include "convto.h"
 #include "stdalgo.h"
 
 CoreExport extern InspIRCd* ServerInstance;
@@ -65,12 +67,12 @@ struct fakederef
 };
 
 #include "config.h"
-#include "convto.h"
 #include "dynref.h"
 #include "consolecolors.h"
 #include "cull_list.h"
 #include "extensible.h"
 #include "fileutils.h"
+#include "ctables.h"
 #include "numerics.h"
 #include "numeric.h"
 #include "uid.h"
@@ -82,7 +84,6 @@ struct fakederef
 #include "logger.h"
 #include "usermanager.h"
 #include "socket.h"
-#include "ctables.h"
 #include "command_parse.h"
 #include "mode.h"
 #include "socketengine.h"
@@ -343,6 +344,13 @@ class CoreExport InspIRCd
         */
        static void DefaultGenRandom(char* output, size_t max);
 
+       /** Bind to a specific port from a config tag.
+        * @param Tag the tag that contains bind information.
+        * @param sa The endpoint to listen on.
+        * @params old_ports Previously listening ports that may be on the same endpoint.
+        */
+       bool BindPort(ConfigTag* tag, const irc::sockets::sockaddrs& sa, std::vector<ListenSocket*>& old_ports);
+
        /** Bind all ports specified in the configuration file.
         * @return The number of ports bound without error
         */
@@ -380,6 +388,12 @@ class CoreExport InspIRCd
        */
        static bool DefaultIsChannel(const std::string& channel);
 
+       /** Determines whether a hostname is valid according to RFC 5891 rules.
+        * @param host The hostname to validate.
+        * @return True if the hostname is valid; otherwise, false.
+        */
+       static bool IsHost(const std::string& host);
+
        /** Return true if str looks like a server ID
         * @param sid string to check against
         */
@@ -577,5 +591,3 @@ inline void stdalgo::culldeleter::operator()(classbase* item)
 }
 
 #include "numericbuilder.h"
-#include "modules/whois.h"
-#include "modules/stats.h"