aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_hideoper.cpp
diff options
context:
space:
mode:
authorGravatar Attila Molnar2015-04-20 17:40:12 +0200
committerGravatar Attila Molnar2015-04-20 17:40:12 +0200
commit8f5efbc7aa33b792e02d01e3288f553e6e98ccaa (patch)
tree54a67ebd11fac07d630fa03acad7797b2f781e80 /src/modules/m_hideoper.cpp
parentRemove exception handling from StreamSocket methods calling IOHooks (diff)
parentRelease v2.0.19 (diff)
Merge insp20
Diffstat (limited to 'src/modules/m_hideoper.cpp')
-rw-r--r--src/modules/m_hideoper.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp
index 5b226f3b8..81b9b888f 100644
--- a/src/modules/m_hideoper.cpp
+++ b/src/modules/m_hideoper.cpp
@@ -68,7 +68,11 @@ class ModuleHideOper : public Module
if (user->IsModeSet(hm) && !source->HasPrivPermission("users/auspex"))
{
// hide the "*" that marks the user as an oper from the /WHO line
- std::string::size_type pos = line.find("*");
+ std::string::size_type spcolon = line.find(" :");
+ if (spcolon == std::string::npos)
+ return; // Another module hid the user completely
+ std::string::size_type sp = line.rfind(' ', spcolon-1);
+ 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