# oper-only independent of if they are in a module #
# or the core. #
# #
+# customversion - If you specify this configuration item, and it is #
+# not set to an empty value, then when a user does #
+# a /VERSION command on the ircd, this string will #
+# be displayed as the second portion of the output, #
+# replacing the system 'uname', compile flags and #
+# socket engine/dns engine names. You may use this #
+# to enhance security, or simply for vanity. #
+# #
<options prefixquit="Quit: "
loglevel="default"
somaxconn="128"
softlimit="128"
operonlystats="oclgkz"
+ customversion=""
allowhalfop="yes">
*/
std::string logpath;
+ /** Custom version string, which if defined can replace the system info in VERSION.
+ */
+ char CustomVersion[MAXBUF];
+
ServerConfig();
/** Clears the include stack in preperation for
#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;
}
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;
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))