| 626 |
|
* to modify what it points!!! |
| 627 |
|
*/ |
| 628 |
|
const char * |
| 629 |
< |
get_client_name(const struct Client *client, int showip) |
| 629 |
> |
get_client_name(const struct Client *client, enum addr_mask_type type) |
| 630 |
|
{ |
| 631 |
|
static char nbuf[HOSTLEN * 2 + USERLEN + 5]; |
| 632 |
|
|
| 633 |
|
assert(client != NULL); |
| 634 |
|
|
| 635 |
< |
if (irccmp(client->name, client->host) == 0) |
| 635 |
> |
if (!irccmp(client->name, client->host)) |
| 636 |
|
return client->name; |
| 637 |
|
|
| 638 |
|
if (ConfigServerHide.hide_server_ips) |
| 639 |
|
if (IsServer(client) || IsConnecting(client) || IsHandshake(client)) |
| 640 |
< |
showip = MASK_IP; |
| 640 |
> |
type = MASK_IP; |
| 641 |
|
|
| 642 |
|
if (ConfigFileEntry.hide_spoof_ips) |
| 643 |
< |
if (showip == SHOW_IP && IsIPSpoof(client)) |
| 644 |
< |
showip = MASK_IP; |
| 643 |
> |
if (type == SHOW_IP && IsIPSpoof(client)) |
| 644 |
> |
type = MASK_IP; |
| 645 |
|
|
| 646 |
|
/* And finally, let's get the host information, ip or name */ |
| 647 |
< |
switch (showip) |
| 647 |
> |
switch (type) |
| 648 |
|
{ |
| 649 |
|
case SHOW_IP: |
| 650 |
|
if (MyConnect(client)) |