summaryrefslogtreecommitdiff
path: root/src/modules/m_hideoper.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-01-17 15:27:09 +0100
committerAttila Molnar <attilamolnar@hush.com>2015-01-17 15:27:09 +0100
commitae4017f4459de4945754dae658f731a19fe7fd64 (patch)
tree3d9916db67c526d7fdaeced02bcd4c2f8ad9d727 /src/modules/m_hideoper.cpp
parentc8b344ea748d62d9f37cacd4dd785f15b186725c (diff)
m_hideoper Fix wrong /WHO output for hidden opers if the channel name contains '*'
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 b83c7de1a..88b0c4cdf 100644
--- a/src/modules/m_hideoper.cpp
+++ b/src/modules/m_hideoper.cpp
@@ -82,7 +82,11 @@ class ModuleHideOper : public Module
if (user->IsModeSet('H') && !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