diff options
| author | 2009-09-02 00:51:56 +0000 | |
|---|---|---|
| committer | 2009-09-02 00:51:56 +0000 | |
| commit | 1b3dabf0ba0088bf7a8493fe89e478731ad0d307 (patch) | |
| tree | 2a30c405eef3f4c97e08950d95d2203be87b1aca /src/modules/m_hideoper.cpp | |
| parent | Fix memory leak and invalid vtable location on unload of m_sslinfo (diff) | |
| download | inspircd++-1b3dabf0ba0088bf7a8493fe89e478731ad0d307.tar.gz inspircd++-1b3dabf0ba0088bf7a8493fe89e478731ad0d307.tar.bz2 inspircd++-1b3dabf0ba0088bf7a8493fe89e478731ad0d307.zip | |
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.cpp | 11 |
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); + } + } }; |
