summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/configreader.cpp1
-rw-r--r--src/coremods/core_stats.cpp13
2 files changed, 10 insertions, 4 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 661e81a6a..f9eebe672 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -407,7 +407,6 @@ void ServerConfig::Fill()
Network = server->getString("network", "Network");
NetBufferSize = ConfValue("performance")->getInt("netbuffersize", 10240, 1024, 65534);
DisabledDontExist = ConfValue("disabled")->getBool("fakenonexistant");
- UserStats = security->getString("userstats");
CustomVersion = security->getString("customversion");
HideBans = security->getBool("hidebans");
HideServer = security->getString("hideserver", security->getString("hidewhois"));
diff --git a/src/coremods/core_stats.cpp b/src/coremods/core_stats.cpp
index 06602b288..6a4427aef 100644
--- a/src/coremods/core_stats.cpp
+++ b/src/coremods/core_stats.cpp
@@ -36,8 +36,9 @@ class CommandStats : public Command
void DoStats(Stats::Context& stats);
public:
- /** Constructor for stats.
- */
+ /** STATS characters which non-opers can request. */
+ std::string userstats;
+
CommandStats(Module* Creator)
: Command(Creator, "STATS", 1, 2)
, statsevprov(Creator, "event/stats")
@@ -77,7 +78,7 @@ void CommandStats::DoStats(Stats::Context& stats)
User* const user = stats.GetSource();
const char statschar = stats.GetSymbol();
- bool isPublic = ServerInstance->Config->UserStats.find(statschar) != std::string::npos;
+ bool isPublic = userstats.find(statschar) != std::string::npos;
bool isRemoteOper = IS_REMOTE(user) && (user->IsOper());
bool isLocalOperWithPrivs = IS_LOCAL(user) && user->HasPrivPermission("servers/auspex");
@@ -408,6 +409,12 @@ class CoreModStats : public Module
{
}
+ void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
+ {
+ ConfigTag* security = ServerInstance->Config->ConfValue("security");
+ cmd.userstats = security->getString("userstats");
+ }
+
Version GetVersion() CXX11_OVERRIDE
{
return Version("Provides the STATS command", VF_CORE | VF_VENDOR);