' if $whm50;
$output .= Cpanel::NAT::get_public_ip($ip) . " ";
$output .= ' | ' if $whm50;
my @adomains = exists $ASN{$ip} ? @{ $ASN{$ip} } : ();
my $sdomains = join ',', @adomains;
if ( exists $ASN{$ip} ) {
if ( !$whm50 ) {
$output .= "[http: $sdomains] ";
}
else {
$output .= "$_ " for @adomains;
}
$ss .= "${ip}_http=$sdomains\n";
}
$output .= ' | ' if $whm50;
if ( $PSN{$ip} ne '' ) {
if ( !$whm50 ) {
$output .= "[ftp: $PSN{$ip}] ";
}
else {
$output .= "$PSN{$ip} ";
}
$ss .= "${ip}_ftp=$PSN{$ip}\n";
}
$output .= ' | ' if $whm50;
my $mailstuff = '';
foreach my $dom (@adomains) {
$dom =~ s/^www\.//g;
if ( -e "$Cpanel::ConfigFiles::VALIASES_DIR/$dom" ) {
my $dcount = 0;
my $ok = open my $DOM, '<', "$Cpanel::ConfigFiles::VALIASES_DIR/$dom";
while (<$DOM>) { $dcount++; }
close $DOM;
if ( $dcount > 0 ) {
$mailstuff = $mailstuff . "$dom($dcount accts) ";
}
}
}
if ( $mailstuff ne '' ) {
$ss = $ss . "${ip}_mail=$mailstuff\n";
if ( !$whm50 ) {
$output .= "[mail: $mailstuff] ";
}
else {
$output .= "$mailstuff ";
}
}
$output .= ' |
' if $whm50;
$output .= "\n";
}
}
$output .= '