@ISA = qw(Exporter);
use Msg;
+use DXUtil;
%connects = undef;
my ($pkg, $call, $conn, $user) = @_;
my $self = {};
- die "trying to create a duplicate Connect for call $call\n" if $connects{$call};
+ die "trying to create a duplicate channel for $call" if $connects{$call};
$self->{call} = $call;
$self->{conn} = $conn;
$self->{user} = $user;
my $line;
foreach $line (@_) {
- print DEBUG "$t > $sort $call $line\n" if defined DEBUG;
+ my $t = atime;
+ chomp $line;
+ print main::DEBUG "$t > $sort $call $line\n" if defined DEBUG;
print "> $sort $call $line\n";
$conn->send_now("$sort$call|$line");
}
my $line;
foreach $line (@_) {
- print DEBUG "$t > $sort $call $line\n" if defined DEBUG;
+ my $t = atime;
+ chomp $line;
+ print main::DEBUG "$t > $sort $call $line\n" if defined DEBUG;
print "> $sort $call $line\n";
$conn->send_later("$sort$call|$line");
}