From d6fcf2726e4075fb323010e067964c84044cbf08 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 27 Apr 2007 17:55:08 +0000 Subject: Add support for hiding listmode lists such as +beI from unprivileged users. See bug #258 git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6849 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/mode.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/mode.cpp') diff --git a/src/mode.cpp b/src/mode.cpp index ef3801ab6..5e384ad9a 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -294,6 +294,12 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool continue; } + if (ServerInstance->Config->HideModeLists && (targetchannel->GetStatus(user) < STATUS_HOP)) + { + user->WriteServ("482 %s %s :Only half-operators and above may view the +%c list",user->nick, targetchannel->name, *mode++); + continue; + } + ModeHandler *mh = this->FindMode(*mode, MODETYPE_CHANNEL); bool display = true; -- cgit v1.2.3