summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/inspircd.cpp9
-rw-r--r--src/inspircd_io.cpp3
2 files changed, 10 insertions, 2 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 5ab7ac4db..b7324a167 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -225,7 +225,14 @@ std::string InspIRCd::GetVersionString()
#else
char dnsengine[] = "singlethread";
#endif
- snprintf(versiondata,MAXBUF,"%s Rev. %s %s :%s [FLAGS=%lu,%s,%s]",VERSION,GetRevision().c_str(),Config->ServerName,SYSTEM,(unsigned long)OPTIMISATION,SE->GetName().c_str(),dnsengine);
+ if (*Config->CustomVersion)
+ {
+ snprintf(versiondata,MAXBUF,"%s Rev. %s %s :%s",VERSION,GetRevision().c_str(),Config->ServerName,Config->CustomVersion);
+ }
+ else
+ {
+ snprintf(versiondata,MAXBUF,"%s Rev. %s %s :%s [FLAGS=%lu,%s,%s]",VERSION,GetRevision().c_str(),Config->ServerName,SYSTEM,(unsigned long)OPTIMISATION,SE->GetName().c_str(),dnsengine);
+ }
return versiondata;
}
diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp
index 2307091c3..64b74a2b9 100644
--- a/src/inspircd_io.cpp
+++ b/src/inspircd_io.cpp
@@ -43,7 +43,7 @@ ServerConfig::ServerConfig()
this->ClearStack();
*ServerName = *Network = *ServerDesc = *AdminName = '\0';
*AdminEmail = *AdminNick = *diepass = *restartpass = '\0';
- *motd = *rules = *PrefixQuit = *DieValue = *DNSServer = '\0';
+ *CustomVersion = *motd = *rules = *PrefixQuit = *DieValue = *DNSServer = '\0';
*OperOnlyStats = *ModPath = *MyExecutable = *DisabledCommands = *PID = '\0';
log_file = NULL;
nofork = false;
@@ -159,6 +159,7 @@ void ServerConfig::Read(bool bail, userrec* user)
ConfValue("options","somaxconn",0,MCON,&Config->config_f);
ConfValue("options","softlimit",0,SLIMT,&Config->config_f);
ConfValue("options","operonlystats",0,Config->OperOnlyStats,&Config->config_f);
+ ConfValue("options","customversion",0,Config->CustomVersion,&Config->config_f);
Config->SoftLimit = atoi(SLIMT);
if ((Config->SoftLimit < 1) || (Config->SoftLimit > MAXCLIENTS))