unsigned int max = parameters.size();
if (max > 5)
max = 5;
+
+ bool has_privs = user->HasPrivPermission("users/auspex");
for (unsigned int i = 0; i < max; i++)
{
User *u = ServerInstance->FindNickOnly(parameters[i]);
retbuf = retbuf + u->nick;
if (IS_OPER(u))
- retbuf = retbuf + "*";
+ {
+ // XXX: +H hidden opers must not be shown as opers
+ ModeHandler* mh = ServerInstance->Modes->FindMode('H', MODETYPE_USER);
+ if ((u == user) || (has_privs) || (!mh) || (!u->IsModeSet('H')) || (mh->name != "hideoper"))
+ retbuf += '*';
+ }
retbuf = retbuf + "=";
retbuf = retbuf + u->ident + "@";
- if (user->HasPrivPermission("users/auspex"))
+ if (has_privs)
{
retbuf = retbuf + u->host;
}