diff options
author | Peter Powell <petpow@saberuk.com> | 2019-04-19 12:23:53 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-04-19 12:23:53 +0100 |
commit | bf7664612b00dfcf84c1a03bae2b009b9f1e1d94 (patch) | |
tree | da2a390ea4d8d2d89b4097dab65f130d23555e15 /src/modules | |
parent | 15bb93a4ead17d14958883561e6ea143f49c1a66 (diff) |
Fix namedmodes exposing non-key secret parameters to outsiders.
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_namedmodes.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/m_namedmodes.cpp b/src/modules/m_namedmodes.cpp index 3c8452e7b..977ac625f 100644 --- a/src/modules/m_namedmodes.cpp +++ b/src/modules/m_namedmodes.cpp @@ -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)); } |