summaryrefslogtreecommitdiff
path: root/src/cmd_names.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd_names.cpp')
-rw-r--r--src/cmd_names.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd_names.cpp b/src/cmd_names.cpp
index bc1eb69c7..43797cbeb 100644
--- a/src/cmd_names.cpp
+++ b/src/cmd_names.cpp
@@ -76,7 +76,7 @@ void cmd_names::Handle (char **parameters, int pcnt, userrec *user)
c = FindChan(parameters[0]);
if (c)
{
- if (((c) && (!has_channel(user,c))) && (c->binarymodes & CM_SECRET))
+ if ((c->binarymodes & CM_SECRET) && (!c->HasUser(user)))
{
WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, c->name);
return;