summaryrefslogtreecommitdiff
path: root/src/modules/m_hideoper.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 00:51:56 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 00:51:56 +0000
commit1b3dabf0ba0088bf7a8493fe89e478731ad0d307 (patch)
tree2a30c405eef3f4c97e08950d95d2203be87b1aca /src/modules/m_hideoper.cpp
parent0155dd1e97f323668442d3fc07b927e8f9004dbe (diff)
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
Diffstat (limited to 'src/modules/m_hideoper.cpp')
-rw-r--r--src/modules/m_hideoper.cpp11
1 files changed, 11 insertions, 0 deletions
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);
+ }
+ }
};