projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix dx bug introduced by ip <ipaddr>
[spider.git]
/
perl
/
DXCommandmode.pm
diff --git
a/perl/DXCommandmode.pm
b/perl/DXCommandmode.pm
index 71a888bfcf5a352de99b84965d296079c23742e6..4091d9e4181df81a6d79527942f19f54f69d4847 100644
(file)
--- a/
perl/DXCommandmode.pm
+++ b/
perl/DXCommandmode.pm
@@
-111,8
+111,8
@@
sub start
my $pagelth = $user->pagelth;
$pagelth = $default_pagelth unless defined $pagelth;
$self->{pagelth} = $pagelth;
my $pagelth = $user->pagelth;
$pagelth = $default_pagelth unless defined $pagelth;
$self->{pagelth} = $pagelth;
- ($self->{width}) = $line =~ /
width=(\d+)/; $line =~ s/\s*width=\d+\s*
//;
- $self->{enhanced} = $line =~ /\
benhanced\b/; $line =~ s/\s*enhanced\s*
//;
+ ($self->{width}) = $line =~ /
\s*width=(\d+)/; $line =~ s/\s*width=\d+
//;
+ $self->{enhanced} = $line =~ /\
s+enhanced/; $line =~ s/\s*enhanced
//;
if ($line =~ /host=/) {
my ($h) = $line =~ /host=(\d+\.\d+\.\d+\.\d+)/;
$line =~ s/\s*host=\d+\.\d+\.\d+\.\d+// if $h;
if ($line =~ /host=/) {
my ($h) = $line =~ /host=(\d+\.\d+\.\d+\.\d+)/;
$line =~ s/\s*host=\d+\.\d+\.\d+\.\d+// if $h;
@@
-125,7
+125,7
@@
sub start
$self->{width} = 80 unless $self->{width} && $self->{width} > 80;
$self->{consort} = $line; # save the connection type
$self->{width} = 80 unless $self->{width} && $self->{width} > 80;
$self->{consort} = $line; # save the connection type
- LogDbg('DXCommand', "$call connected from $self->{hostname} cols $self->
width" . $self->{enhanced}?"enhanced":''
);
+ LogDbg('DXCommand', "$call connected from $self->{hostname} cols $self->
{width}" . ($self->{enhanced}?" enhanced":'')
);
# set some necessary flags on the user if they are connecting
$self->{beep} = $user->wantbeep;
# set some necessary flags on the user if they are connecting
$self->{beep} = $user->wantbeep;
@@
-552,6
+552,7
@@
sub run_cmd
if ($package && $self->can("${package}::handle")) {
no strict 'refs';
dbg("cmd: package $package") if isdbg('command');
if ($package && $self->can("${package}::handle")) {
no strict 'refs';
dbg("cmd: package $package") if isdbg('command');
+# Log('cmd', "$self->{call} on $self->{hostname} : '$cmd $args'");
my $t0 = [gettimeofday];
eval { @ans = &{"${package}::handle"}($self, $args) };
if ($@) {
my $t0 = [gettimeofday];
eval { @ans = &{"${package}::handle"}($self, $args) };
if ($@) {
@@
-1008,8
+1009,9
@@
sub format_dx_spot
my ($slot1, $slot2) = ('', '');
my $clth = 30 + $self->{width} - 80; # allow comment to grow according the screen width
my ($slot1, $slot2) = ('', '');
my $clth = 30 + $self->{width} - 80; # allow comment to grow according the screen width
- my $comment = substr (($_[3] || ''), 0, $clth);
- $comment =~ s/\t/ /g;
+ my $c = $_[3];
+ $c =~ s/\t/ /g;
+ my $comment = substr (($c || ''), 0, $clth);
$comment .= ' ' x ($clth - (length($comment)));
if (!$slot1 && $self->{user}->wantgrid) {
$comment .= ' ' x ($clth - (length($comment)));
if (!$slot1 && $self->{user}->wantgrid) {