use QSL;
use DB_File;
use VE7CC;
+use DXXml;
use strict;
use vars qw(%Cache %cmd_cache $errstr %aliases $scriptbase $maxerrors %nothereslug
my $host = $self->{conn}->{peerhost};
$host ||= "AGW Port #$self->{conn}->{agwport}" if exists $self->{conn}->{agwport};
$host ||= "unknown";
- Log('DXCommand', "$call connected from $host");
+ LogDbg('DXCommand', "$call connected from $host");
$self->{name} = $name ? $name : $call;
$self->send($self->msg('l2',$self->{name}));
my @bad;
if (@bad = BadWords::check($l)) {
$self->badcount(($self->badcount||0) + @bad);
- Log('DXCommand', "$self->{call} swore: $l");
+ LogDbg('DXCommand', "$self->{call} swore: $l with words:" . join(',', @bad) . ")");
} else {
for (@{$self->{talklist}}) {
$self->send_talks($_, $l);
my @bad;
if (@bad = BadWords::check($cmdline)) {
$self->badcount(($self->badcount||0) + @bad);
- Log('DXCommand', "$self->{call} swore: $cmdline");
+ LogDbg('DXCommand', "$self->{call} swore: $cmdline with words:" . join(',', @bad) . ")");
} else {
for (@{$self->{talklist}}) {
$self->send_talks($_, $rawline);
# check for excessive swearing
if ($self->{badcount} && $self->{badcount} >= $maxbadcount) {
- Log('DXCommand', "$self->{call} logged out for excessive swearing");
+ LogDbg('DXCommand', "$self->{call} logged out for excessive swearing");
$self->disconnect;
return;
}
return () if length $cmdline == 0;
-
+
+
# split the command line up into parts, the first part is the command
my ($cmd, $args) = split /\s+/, $cmdline, 2;
$args = "" unless defined $args;
# send info to all logged in thingies
$self->tell_login('logoutu');
- Log('DXCommand', "$call disconnected");
+ LogDbg('DXCommand', "$call disconnected");
$self->SUPER::disconnect;
}
# are there any to do in this directory?
return unless -d $cmdimportdir;
unless (opendir(DIR, $cmdimportdir)) {
- dbg("can\'t open $cmdimportdir $!");
- Log('err', "can\'t open $cmdimportdir $!");
+ LogDbg('err', "can\'t open $cmdimportdir $!");
return;
}
my $s = Script->new($name, $cmdimportdir);
if ($s) {
-
- dbg("Run import cmd file $name");
- Log('DXCommand', "Run import cmd file $name");
+ LogDbg('DXCommand', "Run import cmd file $name");
my @cat = split /[^A-Za-z0-9]+/, $name;
my ($call) = grep {is_callsign(uc $_)} @cat;
$call ||= $main::mycall;
$dxchan->{priv} = $priv;
$dxchan->{user} = $user;
} else {
- Log('err', "Trying to run import cmd for non-existant user $call");
- dbg( "Trying to run import cmd for non-existant user $call");
+ LogDbg('err', "Trying to run import cmd for non-existant user $call");
}
}
}
$s->erase;
for (@out) {
- Log('DXCommand', "Import cmd $name/$call: $_");
- dbg("Import cmd $name/$call: $_");
+ LogDbg('DXCommand', "Import cmd $name/$call: $_");
}
} else {
- Log("Failed to open $cmdimportdir/$name $!");
- dbg("Failed to open $cmdimportdir/$name $!");
+ LogDbg('err', "Failed to open $cmdimportdir/$name $!");
unlink "$cmdimportdir/$name";
}
}