]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_hideoper.cpp
core_hostname_lookup Don't adjust DnsBad stats
[user/henk/code/inspircd.git] / src / modules / m_hideoper.cpp
index 5b226f3b8baf733036314a2b814130ca552342b8..81b9b888f4fff7724b8e1c8acb0d31bcc0194ff7 100644 (file)
@@ -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