sub mlog { my $fh=shift; d(34); my $m=localtime(); $m=~s/^... (...) +(\d+) (\S+) ..(..)/$1-$2-$4 $3/; $m.= " $Con{$fh}->{ip} <$Con{$fh}->{mailfrom}>" if $fh && $Con{$fh}; $m.= " $_[0]\n"; print $m unless $silent; print DEBUG $m; if($logfile && open(LOG,">>$logfile")) {print LOG $m; close LOG;} }