summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp6
1 files changed, 6 insertions, 0 deletions
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 */