diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-01 01:31:40 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-01 01:31:40 +0000 |
commit | 23e62cef071f8d037b2d163d60bcc85f5887776c (patch) | |
tree | bb5b7ebc71ca4d8609b13420162d59a7866e15ca /src/modules/m_hideoper.cpp | |
parent | e336f4047eacfd09d4c57d61b348c9178d4573af (diff) |
Add parameters to OnSendWhoLine hook, fixes "/who * o" returning opers with +H
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12345 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_hideoper.cpp')
-rw-r--r-- | src/modules/m_hideoper.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp index 18db0320c..360dae014 100644 --- a/src/modules/m_hideoper.cpp +++ b/src/modules/m_hideoper.cpp @@ -88,7 +88,7 @@ class ModuleHideOper : public Module return MOD_RES_PASSTHRU; } - void OnSendWhoLine(User* source, User* user, Channel* channel, std::string& line) + void OnSendWhoLine(User* source, const std::vector<std::string>& params, User* user, Channel* channel, std::string& line) { if (user->IsModeSet('H') && !source->HasPrivPermission("users/auspex")) { @@ -96,6 +96,9 @@ class ModuleHideOper : public Module std::string::size_type pos = line.find("* "); if (pos != std::string::npos) line.erase(pos); + // hide the line completely if doing a "/who * o" query + if (params.size() > 1 && params[1].find('o') != std::string::npos) + line.clear(); } } }; |