summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cmd_stats.cpp2
-rw-r--r--src/configreader.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd_stats.cpp b/src/cmd_stats.cpp
index 338a1a2ac..6d2efd047 100644
--- a/src/cmd_stats.cpp
+++ b/src/cmd_stats.cpp
@@ -46,7 +46,7 @@ void DoStats(InspIRCd* ServerInstance, char statschar, userrec* user, string_lis
{
std::string sn = ServerInstance->Config->ServerName;
- if ((*ServerInstance->Config->OperOnlyStats) && (strchr(ServerInstance->Config->OperOnlyStats,statschar)) && (!*user->oper))
+ if ((*ServerInstance->Config->UserStats) && (!*user->oper) && (!strchr(ServerInstance->Config->UserStats,statschar)))
{
results.push_back(sn+std::string(" 481 ")+user->nick+" :Permission denied - STATS "+statschar+" is oper-only");
return;
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 2c7067127..1059770b4 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -28,7 +28,7 @@ ServerConfig::ServerConfig(InspIRCd* Instance) : ServerInstance(Instance)
*TempDir = *ServerName = *Network = *ServerDesc = *AdminName = '\0';
*HideWhoisServer = *AdminEmail = *AdminNick = *diepass = *restartpass = '\0';
*CustomVersion = *motd = *rules = *PrefixQuit = *DieValue = *DNSServer = '\0';
- *OperOnlyStats = *ModPath = *MyExecutable = *DisabledCommands = *PID = '\0';
+ *UserStats = *ModPath = *MyExecutable = *DisabledCommands = *PID = '\0';
log_file = NULL;
NoUserDns = forcedebug = OperSpyWhois = nofork = HideBans = HideSplits = false;
CycleHosts = writelog = AllowHalfop = true;
@@ -545,7 +545,7 @@ void ServerConfig::Read(bool bail, userrec* user)
{"dns", "timeout", &this->dns_timeout, DT_INTEGER, ValidateDnsTimeout},
{"options", "moduledir", &this->ModPath, DT_CHARPTR, ValidateModPath},
{"disabled", "commands", &this->DisabledCommands, DT_CHARPTR, NoValidation},
- {"options", "operonlystats", &this->OperOnlyStats, DT_CHARPTR, NoValidation},
+ {"options", "userstats", &this->UserStats, DT_CHARPTR, NoValidation},
{"options", "customversion", &this->CustomVersion, DT_CHARPTR, NoValidation},
{"options", "hidesplits", &this->HideSplits, DT_BOOLEAN, NoValidation},
{"options", "hidebans", &this->HideBans, DT_BOOLEAN, NoValidation},