]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_hideoper.cpp
Replace OnAccessCheck with OnPreMode to remove a number of redundant checks
[user/henk/code/inspircd.git] / src / modules / m_hideoper.cpp
index b19ecb97c15529e5c0d99eec750a90582034b157..757f2d9af0083e0cbf66d1ed9dffcac616848505 100644 (file)
@@ -86,6 +86,17 @@ class ModuleHideOper : public Module
 
                return MOD_RES_PASSTHRU;
        }
+
+       void OnSendWhoLine(User* source, User* user, Channel* channel, std::string& line)
+       {
+               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("* ");
+                       if (pos != std::string::npos)
+                               line.erase(pos);
+               }
+       }
 };