X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Finspircd.h;h=00093e52ba07fbbd33f0ef3d79fd87f7fd3b3fed;hb=f8a9b6ba4ae0b4b3c7b2a408332230dd82eb4608;hp=95da70e54321a011ce8e68930afc35c8d352c923;hpb=51206352a965aced6913957f80421ade6ebe1eb3;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/inspircd.h b/include/inspircd.h index 95da70e54..00093e52b 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -25,6 +25,7 @@ #pragma once +#include #include #include #include @@ -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& 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"