diff options
author | attilamolnar <am63770@gmail.com> | 2012-04-19 00:38:38 +0200 |
---|---|---|
committer | attilamolnar <am63770@gmail.com> | 2012-04-19 00:38:38 +0200 |
commit | 8e4d701e5a5c739004ba87f3552813c801482b9c (patch) | |
tree | c54fa17cbbe96e08b4d91500a62d93924f4301d1 /src | |
parent | 3f5e6f3c1180cc72f520cfddf36f2ba90787b8ad (diff) |
Fix issue #18 reported by @int- (remote restriction on /stats)
Diffstat (limited to 'src')
-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)", |