Allow opers and shide_exempt users to see hopcounts even if flatten_links is on.
This commit is contained in:
parent
c552a39d49
commit
6dfa266965
|
@ -475,7 +475,7 @@ do_who(struct Client *source_p, struct Client *target_p, struct membership *mspt
|
||||||
source_p->name, msptr ? msptr->chptr->chname : "*",
|
source_p->name, msptr ? msptr->chptr->chname : "*",
|
||||||
target_p->username, target_p->host,
|
target_p->username, target_p->host,
|
||||||
target_p->servptr->name, target_p->name, status,
|
target_p->servptr->name, target_p->name, status,
|
||||||
ConfigServerHide.flatten_links ? 0 : target_p->hopcount,
|
ConfigServerHide.flatten_links && !IsOper(source_p) && !IsExemptShide(source_p) ? 0 : target_p->hopcount,
|
||||||
target_p->info);
|
target_p->info);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -505,7 +505,7 @@ do_who(struct Client *source_p, struct Client *target_p, struct membership *mspt
|
||||||
if (fmt->fields & FIELD_FLAGS)
|
if (fmt->fields & FIELD_FLAGS)
|
||||||
append_format(str, sizeof str, &pos, " %s", status);
|
append_format(str, sizeof str, &pos, " %s", status);
|
||||||
if (fmt->fields & FIELD_HOP)
|
if (fmt->fields & FIELD_HOP)
|
||||||
append_format(str, sizeof str, &pos, " %d", ConfigServerHide.flatten_links ? 0 : target_p->hopcount);
|
append_format(str, sizeof str, &pos, " %d", ConfigServerHide.flatten_links && !IsOper(source_p) && !IsExemptShide(source_p) ? 0 : target_p->hopcount);
|
||||||
if (fmt->fields & FIELD_IDLE)
|
if (fmt->fields & FIELD_IDLE)
|
||||||
append_format(str, sizeof str, &pos, " %d", (int)(MyClient(target_p) ? rb_current_time() - target_p->localClient->last : 0));
|
append_format(str, sizeof str, &pos, " %d", (int)(MyClient(target_p) ? rb_current_time() - target_p->localClient->last : 0));
|
||||||
if (fmt->fields & FIELD_ACCOUNT)
|
if (fmt->fields & FIELD_ACCOUNT)
|
||||||
|
|
Loading…
Reference in New Issue