projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix create_sysop.pl to work on base git install
[spider.git]
/
perl
/
DXCommandmode.pm
diff --git
a/perl/DXCommandmode.pm
b/perl/DXCommandmode.pm
index 900460aef2c1df89f65fb48b1a97fd1ef7bb3eeb..b10149ec6bcbd9bcf75b27e8839898878c21dd41 100644
(file)
--- a/
perl/DXCommandmode.pm
+++ b/
perl/DXCommandmode.pm
@@
-136,6
+136,7
@@
sub start
$self->{dx} = $user->wantdx;
$self->{logininfo} = $user->wantlogininfo;
$self->{ann_talk} = $user->wantann_talk;
$self->{dx} = $user->wantdx;
$self->{logininfo} = $user->wantlogininfo;
$self->{ann_talk} = $user->wantann_talk;
+ $self->{wantrbn} = $user->wantrbn;
$self->{here} = 1;
$self->{prompt} = $user->prompt if $user->prompt;
$self->{lastmsgpoll} = 0;
$self->{here} = 1;
$self->{prompt} = $user->prompt if $user->prompt;
$self->{lastmsgpoll} = 0;
@@
-154,6
+155,10
@@
sub start
$self->{registered} = 1;
}
$self->{registered} = 1;
}
+ # establish slug queue, if required
+ $self->{sluggedpc11s} = [];
+ $self->{isslugged} = $DXProt::pc92_slug_changes + $main::systime if $DXProt::pc92_slug_changes;
+
# send the relevant MOTD
$self->send_motd;
# send the relevant MOTD
$self->send_motd;
@@
-176,7
+181,10
@@
sub start
$self->{annfilter} = Filter::read_in('ann', $call, 0)
|| Filter::read_in('ann', $nossid, 0)
|| Filter::read_in('ann', 'user_default', 0) ;
$self->{annfilter} = Filter::read_in('ann', $call, 0)
|| Filter::read_in('ann', $nossid, 0)
|| Filter::read_in('ann', 'user_default', 0) ;
-
+ $self->{rbnfilter} = Filter::read_in('rbn', $call, 0)
+ || Filter::read_in('rbn', $nossid, 0)
+ || Filter::read_in('rbn', 'user_default', 0);
+
# clean up qra locators
my $qra = $user->qra;
$qra = undef if ($qra && !DXBearing::is_qra($qra));
# clean up qra locators
my $qra = $user->qra;
$qra = undef if ($qra && !DXBearing::is_qra($qra));
@@
-512,7
+520,7
@@
sub run_cmd
# check cmd
if ($cmd =~ m|^/| || $cmd =~ m|[^-?\w/]|) {
# check cmd
if ($cmd =~ m|^/| || $cmd =~ m|[^-?\w/]|) {
- LogDbg('DXCommand', "cmd: invalid characters in '$cmd'");
+ LogDbg('DXCommand', "cmd:
$self->{call} -
invalid characters in '$cmd'");
return $self->_error_out('e1');
}
return $self->_error_out('e1');
}
@@
-955,7
+963,7
@@
sub announce
$buf = dd(['ann', $to, $target, $text, @_])
} else {
$buf = "$to$target de $_[0]: $text";
$buf = dd(['ann', $to, $target, $text, @_])
} else {
$buf = "$to$target de $_[0]: $text";
- $buf =~ s/\%5E/^/g;
+
#
$buf =~ s/\%5E/^/g;
$buf .= "\a\a" if $self->{beep};
}
$self->local_send($target eq 'WX' ? 'W' : 'N', $buf);
$buf .= "\a\a" if $self->{beep};
}
$self->local_send($target eq 'WX' ? 'W' : 'N', $buf);
@@
-980,7
+988,7
@@
sub chat
$buf = dd(['chat', $to, $target, $text, @_])
} else {
$buf = "$target de $_[0]: $text";
$buf = dd(['chat', $to, $target, $text, @_])
} else {
$buf = "$target de $_[0]: $text";
- $buf =~ s/\%5E/^/g;
+
#
$buf =~ s/\%5E/^/g;
$buf .= "\a\a" if $self->{beep};
}
$self->local_send('C', $buf);
$buf .= "\a\a" if $self->{beep};
}
$self->local_send('C', $buf);
@@
-992,38
+1000,39
@@
sub format_dx_spot
my $t = ztime($_[2]);
my $loc = '';
my $t = ztime($_[2]);
my $loc = '';
- my $clth = $self->{consort} eq 'local' ? 29 : 30;
+ my $clth = 31 + $self->{width} - 80; # allow comment to grow according the screen width
+ # --$clth if $self->{consort} eq 'local';
+
my $comment = substr (($_[3] || ''), 0, $clth);
my $comment = substr (($_[3] || ''), 0, $clth);
+ $comment =~ s/\t/ /g;
+
$comment .= ' ' x ($clth - (length($comment)));
$comment .= ' ' x ($clth - (length($comment)));
- if ($self->{user}->wantgrid) {
+
+ if ($self->{user}->wantgrid) {
my $ref = DXUser::get_current($_[1]);
if ($ref && $ref->qra) {
my $ref = DXUser::get_current($_[1]);
if ($ref && $ref->qra) {
- $loc = ' ' . substr($ref->qra, 0, 4);
- $comment = substr $comment, 0, ($clth - (length($comment)+length($loc)));
- $comment .= $loc;
- $loc = '';
+ my $cloc = ' ' . substr($ref->qra, 0, 4);
+ $comment = substr $comment, 0, ($clth - (length($comment)+length($cloc)));
+ $comment .= $cloc;
}
}
- }
-
- if ($self->{user}->wantgrid) {
- my $ref = DXUser::get_current($_[4]);
+ my $origin = $_[4];
+ $origin =~ s/-#$//; # sigh......
+ $ref = DXUser::get_current($origin);
if ($ref && $ref->qra) {
$loc = ' ' . substr($ref->qra, 0, 4);
}
if ($ref && $ref->qra) {
$loc = ' ' . substr($ref->qra, 0, 4);
}
- }
-
- if ($self->{user}->wantdxitu) {
+ } elsif ($self->{user}->wantdxitu) {
$loc = ' ' . sprintf("%2d", $_[10]) if defined $_[10];
$loc = ' ' . sprintf("%2d", $_[10]) if defined $_[10];
- $comment = substr($comment, 0, $
self->{consort} eq 'local' ? 26 : 27
) . ' ' . sprintf("%2d", $_[8]) if defined $_[8];
+ $comment = substr($comment, 0, $
clth-3
) . ' ' . sprintf("%2d", $_[8]) if defined $_[8];
} elsif ($self->{user}->wantdxcq) {
$loc = ' ' . sprintf("%2d", $_[11]) if defined $_[11];
} elsif ($self->{user}->wantdxcq) {
$loc = ' ' . sprintf("%2d", $_[11]) if defined $_[11];
- $comment = substr($comment, 0,
$self->{consort} eq 'local' ? 26 : 27
) . ' ' . sprintf("%2d", $_[9]) if defined $_[9];
+ $comment = substr($comment, 0,
$clth-3
) . ' ' . sprintf("%2d", $_[9]) if defined $_[9];
} elsif ($self->{user}->wantusstate) {
$loc = ' ' . $_[13] if $_[13];
} elsif ($self->{user}->wantusstate) {
$loc = ' ' . $_[13] if $_[13];
- $comment = substr($comment, 0, $
self->{consort} eq 'local' ? 26 : 27
) . ' ' . $_[12] if $_[12];
+ $comment = substr($comment, 0, $
clth-3
) . ' ' . $_[12] if $_[12];
}
}
- return sprintf "DX de %-
7.7s%11.1f
%-12.12s %-s $t$loc", "$_[4]:", $_[0], $_[1], $comment;
+ return sprintf "DX de %-
9.9s%10.1f
%-12.12s %-s $t$loc", "$_[4]:", $_[0], $_[1], $comment;
}
# send a dx spot
}
# send a dx spot
@@
-1067,7
+1076,7
@@
sub dx_spot
} else {
$buf = $self->format_dx_spot(@_);
$buf .= "\a\a" if $self->{beep};
} else {
$buf = $self->format_dx_spot(@_);
$buf .= "\a\a" if $self->{beep};
- $buf =~ s/\%5E/^/g;
+
#
$buf =~ s/\%5E/^/g;
}
$self->local_send('X', $buf);
}
$self->local_send('X', $buf);
@@
-1332,11
+1341,16
@@
sub spawn_cmd
sub {
my $subpro = shift;
if (isdbg('progress')) {
sub {
my $subpro = shift;
if (isdbg('progress')) {
- my $s = qq{line: "$line"};
+ my $s = qq{
$call
line: "$line"};
$s .= ", args: " . join(', ', map { defined $_ ? qq{'$_'} : q{'undef'} } @$args) if $args && @$args;
dbg($s);
}
$s .= ", args: " . join(', ', map { defined $_ ? qq{'$_'} : q{'undef'} } @$args) if $args && @$args;
dbg($s);
}
- eval { @out = $cmdref->(@$args); };
+ eval {
+ ++$self->{_in_sub_process};
+ dbg "\$self->{_in_sub_process} = $self->{_in_sub_process}";
+ @out = $cmdref->(@$args);
+ --$self->{_in_sub_process} if $self->{_in_sub_process} > 0;
+ };
if ($@) {
DXDebug::dbgprintring(25);
push @out, DXDebug::shortmess($@);
if ($@) {
DXDebug::dbgprintring(25);
push @out, DXDebug::shortmess($@);