mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-12 12:09:03 -04:00
Fix namedmodes exposing non-key secret parameters to outsiders.
This commit is contained in:
parent
15bb93a4ea
commit
bf7664612b
@ -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));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user