summaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-02 17:32:45 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-02 17:32:45 +0000
commite66e07d53efd2889e5954d30327343482d550a84 (patch)
tree45cb40ed0a78c08f005f37f1f9b7f529c645302e /src/configreader.cpp
parent4e078ed34b70fc780886a8412f891ca9540d7622 (diff)
Remove MAXCLIENTS, this is supported at runtime by the softlimit anyway.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9265 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 35c65fede..2c5d01ee1 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -47,7 +47,7 @@ ServerConfig::ServerConfig(InspIRCd* Instance) : ServerInstance(Instance)
dns_timeout = DieDelay = 5;
MaxTargets = 20;
NetBufferSize = 10240;
- SoftLimit = MAXCLIENTS;
+ SoftLimit = Instance->SE->GetMaxFds();
MaxConn = SOMAXCONN;
MaxWhoResults = 0;
debugging = 0;
@@ -261,10 +261,10 @@ bool ValidateMaxTargets(ServerConfig* conf, const char*, const char*, ValueItem
bool ValidateSoftLimit(ServerConfig* conf, const char*, const char*, ValueItem &data)
{
- if ((data.GetInteger() < 1) || (data.GetInteger() > MAXCLIENTS))
+ if ((data.GetInteger() < 1) || (data.GetInteger() > conf->GetInstance()->SE->GetMaxFds()))
{
- conf->GetInstance()->Logs->Log("CONFIG",DEFAULT,"WARNING: <options:softlimit> value is greater than %d or less than 0, set to %d.",MAXCLIENTS,MAXCLIENTS);
- data.Set(MAXCLIENTS);
+ conf->GetInstance()->Logs->Log("CONFIG",DEFAULT,"WARNING: <options:softlimit> value is greater than %d or less than 0, set to %d.",conf->GetInstance()->SE->GetMaxFds(),conf->GetInstance()->SE->GetMaxFds());
+ data.Set(conf->GetInstance()->SE->GetMaxFds());
}
return true;
}
@@ -767,7 +767,7 @@ void ServerConfig::Read(bool bail, User* user)
/* These tags can occur ONCE or not at all */
InitialConfig Values[] = {
- {"options", "softlimit", MAXCLIENTS_S, new ValueContainerUInt (&this->SoftLimit), DT_INTEGER, ValidateSoftLimit},
+ {"options", "softlimit", "0", new ValueContainerUInt (&this->SoftLimit), DT_INTEGER, ValidateSoftLimit},
{"options", "somaxconn", SOMAXCONN_S, new ValueContainerInt (&this->MaxConn), DT_INTEGER, ValidateMaxConn},
{"options", "moronbanner", "Youre banned!", new ValueContainerChar (this->MoronBanner), DT_CHARPTR, NoValidation},
{"server", "name", "", new ValueContainerChar (this->ServerName), DT_HOSTNAME|DT_BOOTONLY, ValidateServerName},