47 |
|
if (HasUMode(source_p, UMODE_OPER) || !ConfigServerHide.flatten_links) |
48 |
|
{ |
49 |
|
const char *mask = (parc > 2 ? parv[2] : parv[1]); |
50 |
< |
const char *me_name, *nick, *p; |
51 |
< |
struct Client *target_p; |
50 |
> |
const char *me_name, *nick; |
51 |
|
dlink_node *ptr; |
52 |
|
|
53 |
|
me_name = ID_or_name(&me, source_p->from); |
55 |
|
|
56 |
|
DLINK_FOREACH(ptr, global_serv_list.head) |
57 |
|
{ |
58 |
< |
target_p = ptr->data; |
58 |
> |
struct Client *target_p = ptr->data; |
59 |
|
|
60 |
|
/* skip hidden servers */ |
61 |
|
if (IsHidden(target_p)) |
65 |
|
if (!EmptyString(mask) && !match(mask, target_p->name)) |
66 |
|
continue; |
67 |
|
|
68 |
< |
if (target_p->info[0]) |
69 |
< |
{ |
71 |
< |
if ((p = strchr(target_p->info, ']'))) |
72 |
< |
p += 2; /* skip the nasty [IP] part */ |
73 |
< |
else |
74 |
< |
p = target_p->info; |
75 |
< |
} |
76 |
< |
else |
77 |
< |
p = "(Unknown Location)"; |
78 |
< |
|
79 |
< |
/* We just send the reply, as if they are here there's either no SHIDE, |
68 |
> |
/* |
69 |
> |
* We just send the reply, as if they are here there's either no SHIDE, |
70 |
|
* or they're an oper.. |
71 |
|
*/ |
72 |
|
sendto_one(source_p, form_str(RPL_LINKS), |
73 |
|
me_name, nick, |
74 |
< |
target_p->name, target_p->servptr->name, |
75 |
< |
target_p->hopcount, p); |
74 |
> |
target_p->name, target_p->servptr->name, |
75 |
> |
target_p->hopcount, target_p->info[0]); |
76 |
|
} |
77 |
|
|
78 |
|
sendto_one(source_p, form_str(RPL_ENDOFLINKS), |