diff options
-rw-r--r-- | src/stats.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/stats.cpp b/src/stats.cpp index 5a117b5d3..cd132afed 100644 --- a/src/stats.cpp +++ b/src/stats.cpp @@ -19,7 +19,11 @@ void InspIRCd::DoStats(char statschar, User* user, string_list &results) { std::string sn(this->Config->ServerName); - if (!user->HasPrivPermission("servers/auspex") && Config->UserStats.find(statschar) == std::string::npos) + bool isPublic = Config->UserStats.find(statschar) != std::string::npos; + bool isRemoteOper = IS_REMOTE(user) && IS_OPER(user); + bool isLocalOperWithPrivs = IS_LOCAL(user) && user->HasPrivPermission("servers/auspex"); + + if (!isPublic && !isRemoteOper && !isLocalOperWithPrivs) { this->SNO->WriteToSnoMask('t', "%s '%c' denied for %s (%s@%s)", |