diff options
-rw-r--r-- | include/configreader.h | 8 | ||||
-rw-r--r-- | include/modules.h | 2 | ||||
-rw-r--r-- | make/template/config.h | 16 | ||||
-rw-r--r-- | src/configreader.cpp | 8 | ||||
-rw-r--r-- | src/inspircd.cpp | 4 | ||||
-rw-r--r-- | src/logger.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_httpd.cpp | 2 | ||||
-rw-r--r-- | src/server.cpp | 4 | ||||
-rw-r--r-- | src/users.cpp | 4 |
9 files changed, 26 insertions, 26 deletions
diff --git a/include/configreader.h b/include/configreader.h index f59fba389..f3b1f8b74 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -216,10 +216,10 @@ class CoreExport ServerConfig std::string Module; ServerPaths() - : Config(CONFIG_PATH) - , Data(DATA_PATH) - , Log(LOG_PATH) - , Module(MOD_PATH) { } + : Config(INSPIRCD_CONFIG_PATH) + , Data(INSPIRCD_DATA_PATH) + , Log(INSPIRCD_LOG_PATH) + , Module(INSPIRCD_MODULE_PATH) { } std::string PrependConfig(const std::string& fn) const { return FileSystem::ExpandPath(Config, fn); } std::string PrependData(const std::string& fn) const { return FileSystem::ExpandPath(Data, fn); } diff --git a/include/modules.h b/include/modules.h index 2a1ceb07a..a9db6919c 100644 --- a/include/modules.h +++ b/include/modules.h @@ -1343,7 +1343,7 @@ struct AllModuleList { { \ return new y; \ } \ - extern "C" DllExport const char inspircd_src_version[] = VERSION " " REVISION; + extern "C" DllExport const char inspircd_src_version[] = INSPIRCD_VERSION " " INSPIRCD_REVISION; #endif #define COMMAND_INIT(c) MODULE_INIT(CommandModule<c>) diff --git a/make/template/config.h b/make/template/config.h index 6aa593975..513c550f5 100644 --- a/make/template/config.h +++ b/make/template/config.h @@ -19,15 +19,15 @@ #pragma once -#define BRANCH "InspIRCd-@VERSION_MAJOR@.@VERSION_MINOR@" -#define VERSION "InspIRCd-@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@" -#define REVISION "@VERSION_LABEL@" -#define SYSTEM "@SYSTEM_NAME_VERSION@" +#define INSPIRCD_BRANCH "InspIRCd-@VERSION_MAJOR@.@VERSION_MINOR@" +#define INSPIRCD_VERSION "InspIRCd-@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@" +#define INSPIRCD_REVISION "@VERSION_LABEL@" +#define INSPIRCD_SYSTEM "@SYSTEM_NAME_VERSION@" -#define CONFIG_PATH "@CONFIG_DIR@" -#define DATA_PATH "@DATA_DIR@" -#define LOG_PATH "@LOG_DIR@" -#define MOD_PATH "@MODULE_DIR@" +#define INSPIRCD_CONFIG_PATH "@CONFIG_DIR@" +#define INSPIRCD_DATA_PATH "@DATA_DIR@" +#define INSPIRCD_LOG_PATH "@LOG_DIR@" +#define INSPIRCD_MODULE_PATH "@MODULE_DIR@" #define INSPIRCD_SOCKETENGINE_NAME "@SOCKETENGINE@" diff --git a/src/configreader.cpp b/src/configreader.cpp index c82bda479..c4b5c4510 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -406,10 +406,10 @@ void ServerConfig::Fill() Limits.MaxGecos = ConfValue("limits")->getInt("maxgecos", 128); Limits.MaxAway = ConfValue("limits")->getInt("maxaway", 200); Limits.MaxLine = ConfValue("limits")->getInt("maxline", 512); - Paths.Config = ConfValue("path")->getString("configdir", CONFIG_PATH); - Paths.Data = ConfValue("path")->getString("datadir", DATA_PATH); - Paths.Log = ConfValue("path")->getString("logdir", LOG_PATH); - Paths.Module = ConfValue("path")->getString("moduledir", MOD_PATH); + Paths.Config = ConfValue("path")->getString("configdir", INSPIRCD_CONFIG_PATH); + Paths.Data = ConfValue("path")->getString("datadir", INSPIRCD_DATA_PATH); + Paths.Log = ConfValue("path")->getString("logdir", INSPIRCD_LOG_PATH); + Paths.Module = ConfValue("path")->getString("moduledir", INSPIRCD_MODULE_PATH); InvBypassModes = options->getBool("invitebypassmodes", true); NoSnoticeStack = options->getBool("nosnoticestack", false); diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 24072868a..efbb013ca 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -236,7 +236,7 @@ void InspIRCd::WritePID(const std::string &filename) } InspIRCd::InspIRCd(int argc, char** argv) : - ConfigFileName(CONFIG_PATH "/inspircd.conf"), + ConfigFileName(INSPIRCD_CONFIG_PATH "/inspircd.conf"), /* Functor pointer initialisation. * @@ -369,7 +369,7 @@ InspIRCd::InspIRCd(int argc, char** argv) : if (do_version) { - std::cout << std::endl << VERSION << " " << REVISION << std::endl; + std::cout << std::endl << INSPIRCD_VERSION << " " << INSPIRCD_REVISION << std::endl; Exit(EXIT_STATUS_NOERROR); } diff --git a/src/logger.cpp b/src/logger.cpp index 61ac517c7..78809c555 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -51,8 +51,8 @@ */ const char LogStream::LogHeader[] = - "Log started for " VERSION " (" REVISION ", " MODULE_INIT_STR ")" - " - compiled on " SYSTEM; + "Log started for " INSPIRCD_VERSION " (" INSPIRCD_REVISION ", " MODULE_INIT_STR ")" + " - compiled on " INSPIRCD_SYSTEM; LogManager::LogManager() : Logging(false) diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index 053f4b924..dda39afec 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -191,7 +191,7 @@ class HttpServerSocket : public BufferedSocket date[strlen(date) - 1] = '\0'; rheaders.CreateHeader("Date", date); - rheaders.CreateHeader("Server", BRANCH); + rheaders.CreateHeader("Server", INSPIRCD_BRANCH); rheaders.SetHeader("Content-Length", ConvToStr(size)); if (size) diff --git a/src/server.cpp b/src/server.cpp index 7fd62fdf8..ac638a08c 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -68,8 +68,8 @@ void InspIRCd::Rehash(const std::string& uuid) std::string InspIRCd::GetVersionString(bool getFullVersion) { if (getFullVersion) - return VERSION " " + Config->ServerName + " :" SYSTEM " [" REVISION "," INSPIRCD_SOCKETENGINE_NAME "," + Config->sid + "]"; - return BRANCH " " + Config->ServerName + " :" + Config->CustomVersion; + return INSPIRCD_VERSION " " + Config->ServerName + " :" INSPIRCD_SYSTEM " [" INSPIRCD_REVISION "," INSPIRCD_SOCKETENGINE_NAME "," + Config->sid + "]"; + return INSPIRCD_BRANCH " " + Config->ServerName + " :" + Config->CustomVersion; } std::string UIDGenerator::GenerateSID(const std::string& servername, const std::string& serverdesc) diff --git a/src/users.cpp b/src/users.cpp index 249f87850..6e9e8202e 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -558,11 +558,11 @@ void LocalUser::FullConnect() return; this->WriteNumeric(RPL_WELCOME, ":Welcome to the %s IRC Network %s", ServerInstance->Config->Network.c_str(), GetFullRealHost().c_str()); - this->WriteNumeric(RPL_YOURHOSTIS, ":Your host is %s, running version %s", ServerInstance->Config->ServerName.c_str(), BRANCH); + this->WriteNumeric(RPL_YOURHOSTIS, ":Your host is %s, running version %s", ServerInstance->Config->ServerName.c_str(), INSPIRCD_BRANCH); this->WriteNumeric(RPL_SERVERCREATED, ":This server was created %s %s", __TIME__, __DATE__); const std::string& modelist = ServerInstance->Modes->GetModeListFor004Numeric(); - this->WriteNumeric(RPL_SERVERVERSION, "%s %s %s", ServerInstance->Config->ServerName.c_str(), BRANCH, modelist.c_str()); + this->WriteNumeric(RPL_SERVERVERSION, "%s %s %s", ServerInstance->Config->ServerName.c_str(), INSPIRCD_BRANCH, modelist.c_str()); ServerInstance->ISupport.SendTo(this); |