From 1b7b2a696d9bf4ee1d93544138aa775d6fa92c74 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 4 May 2007 14:53:56 +0000 Subject: foolish human! you can't /mode query a user that isnt there! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6871 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/mode.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mode.cpp b/src/mode.cpp index 8f74f92bf..b98316597 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -246,6 +246,12 @@ void ModeParser::DisplayCurrentModes(userrec *user, userrec* targetuser, chanrec } else if (targetuser) { + if (targetuser->Visibility && !targetuser->Visibility->VisibleTo(user)) + { + user->WriteServ("401 %s %s :No such nick/channel",user->nick, text); + return; + } + if ((targetuser == user) || (*user->oper)) { /* Display user's current mode string */ -- cgit v1.2.3