m_whois: show services even if they lack opernames
This commit is contained in:
parent
b5f46fda92
commit
ea51635c01
1 changed files with 11 additions and 7 deletions
|
@ -293,10 +293,13 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
|
||||||
sendto_one_numeric(source_p, RPL_AWAY, form_str(RPL_AWAY),
|
sendto_one_numeric(source_p, RPL_AWAY, form_str(RPL_AWAY),
|
||||||
target_p->name, target_p->user->away);
|
target_p->name, target_p->user->away);
|
||||||
|
|
||||||
|
char *s = NULL;
|
||||||
|
if (IsService(target_p))
|
||||||
|
{
|
||||||
|
s = ConfigFileEntry.servicestring;
|
||||||
|
}
|
||||||
if (!EmptyString(target_p->user->opername) && IsOper(target_p))
|
if (!EmptyString(target_p->user->opername) && IsOper(target_p))
|
||||||
{
|
{
|
||||||
char buf[512];
|
|
||||||
char *s = NULL;
|
|
||||||
if (target_p == source_p || HasPrivilege(source_p, "oper:privs"))
|
if (target_p == source_p || HasPrivilege(source_p, "oper:privs"))
|
||||||
{
|
{
|
||||||
const char *privset = "(missing)";
|
const char *privset = "(missing)";
|
||||||
|
@ -312,11 +315,12 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
|
||||||
}
|
}
|
||||||
else if (!ConfigFileEntry.hide_opers_in_whois && SeesOper(target_p, source_p))
|
else if (!ConfigFileEntry.hide_opers_in_whois && SeesOper(target_p, source_p))
|
||||||
{
|
{
|
||||||
s = IsService(target_p) ? ConfigFileEntry.servicestring :
|
s = IsAdmin(target_p) ? GlobalSetOptions.adminstring :
|
||||||
IsAdmin(target_p) ? GlobalSetOptions.adminstring :
|
|
||||||
GlobalSetOptions.operstring;
|
GlobalSetOptions.operstring;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (s != NULL)
|
if (s != NULL)
|
||||||
|
{
|
||||||
sendto_one_numeric(source_p, RPL_WHOISOPERATOR, form_str(RPL_WHOISOPERATOR),
|
sendto_one_numeric(source_p, RPL_WHOISOPERATOR, form_str(RPL_WHOISOPERATOR),
|
||||||
target_p->name, s);
|
target_p->name, s);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue