]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_namedmodes.cpp
Fall back to the most recent version supported on "CAP LS".
[user/henk/code/inspircd.git] / src / modules / m_namedmodes.cpp
index 3c8452e7ba9b495d3b470d0c80659f95b78e71ea..977ac625fbbefc7e20e8bbc2cf5d2d89442c0f71 100644 (file)
@@ -38,10 +38,11 @@ static void DisplayList(LocalUser* user, Channel* channel)
                if (!channel->IsModeSet(mh))
                        continue;
                numeric.Add("+" + mh->name);
-               if (mh->NeedsParam(true))
+               ParamModeBase* pm = mh->IsParameterMode();
+               if (pm)
                {
-                       if ((mh->name == "key") && (!channel->HasUser(user)) && (!user->HasPrivPermission("channels/auspex")))
-                               numeric.Add("<key>");
+                       if ((pm->IsParameterSecret()) && (!channel->HasUser(user)) && (!user->HasPrivPermission("channels/auspex")))
+                               numeric.Add("<" + mh->name + ">");
                        else
                                numeric.Add(channel->GetModeParameter(mh));
                }