summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cmd_who.cpp2
-rw-r--r--src/configreader.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd_who.cpp b/src/cmd_who.cpp
index 66a94cfd6..31e8030f5 100644
--- a/src/cmd_who.cpp
+++ b/src/cmd_who.cpp
@@ -312,7 +312,7 @@ CmdResult cmd_who::Handle (const char** parameters, int pcnt, userrec *user)
}
}
/* Send the results out */
- if ((whoresults.size() <= (size_t)ServerInstance->Config->MaxWhoResults) || opt_unlimit)
+ if ((ServerInstance->Config->MaxWhoResults && (whoresults.size() <= (size_t)ServerInstance->Config->MaxWhoResults)) || opt_unlimit)
{
for (std::vector<std::string>::const_iterator n = whoresults.begin(); n != whoresults.end(); n++)
user->WriteServ(*n);
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 88b8a9af3..d4291692f 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -37,7 +37,7 @@ ServerConfig::ServerConfig(InspIRCd* Instance) : ServerInstance(Instance)
NetBufferSize = 10240;
SoftLimit = MAXCLIENTS;
MaxConn = SOMAXCONN;
- MaxWhoResults = 100;
+ MaxWhoResults = 0;
debugging = 0;
MaxChans = 20;
OperMaxChans = 30;
@@ -297,9 +297,9 @@ bool ValidateNetBufferSize(ServerConfig* conf, const char* tag, const char* valu
bool ValidateMaxWho(ServerConfig* conf, const char* tag, const char* value, ValueItem &data)
{
- if ((!data.GetInteger()) || (data.GetInteger() > 65535) || (data.GetInteger() < 1))
+ if ((data.GetInteger() > 65535) || (data.GetInteger() < 1))
{
- conf->GetInstance()->Log(DEFAULT,"No MaxWhoResults specified or size out of range, setting to default of 128.");
+ conf->GetInstance()->Log(DEFAULT,"<options:maxwhoresults> size out of range, setting to default of 128.");
data.Set(128);
}
return true;