summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-02-26 15:44:39 +0100
committerAttila Molnar <attilamolnar@hush.com>2016-02-26 15:44:39 +0100
commit2a16373ca12e0b4bbe72a487f1620a0d027414be (patch)
tree51bf9ffc2b3edbf0f87e937085ea6589b17717a0 /src/modules
parenta5c00b1548d7c8fc89358c26901fa534f7836cc1 (diff)
m_hideoper Reorder checks in OnSendWhoLine()
Check if the entire line should be hidden first
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_hideoper.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp
index 51b00de92..5389ed18d 100644
--- a/src/modules/m_hideoper.cpp
+++ b/src/modules/m_hideoper.cpp
@@ -108,6 +108,10 @@ class ModuleHideOper : public Module, public Whois::LineEventListener
{
if (user->IsModeSet(hm) && !source->HasPrivPermission("users/auspex"))
{
+ // Hide the line completely if doing a "/who * o" query
+ if ((params.size() > 1) && (params[1].find('o') != std::string::npos))
+ return MOD_RES_DENY;
+
// hide the "*" that marks the user as an oper from the /WHO line
std::string::size_type spcolon = line.find(" :");
if (spcolon == std::string::npos)
@@ -116,9 +120,6 @@ class ModuleHideOper : public Module, public Whois::LineEventListener
std::string::size_type pos = line.find('*', sp);
if (pos != std::string::npos)
line.erase(pos, 1);
- // hide the line completely if doing a "/who * o" query
- if (params.size() > 1 && params[1].find('o') != std::string::npos)
- return MOD_RES_DENY;
}
return MOD_RES_PASSTHRU;
}