From 1b3dabf0ba0088bf7a8493fe89e478731ad0d307 Mon Sep 17 00:00:00 2001 From: danieldg Date: Wed, 2 Sep 2009 00:51:56 +0000 Subject: Add OnSendWhoLine hook, and use it in the oper hiding modules git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11650 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_hideoper.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/modules/m_hideoper.cpp') diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp index b19ecb97c..757f2d9af 100644 --- a/src/modules/m_hideoper.cpp +++ b/src/modules/m_hideoper.cpp @@ -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); + } + } }; -- cgit v1.2.3