projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
23b5ee5
)
back port registration from mojo
author
Dirk Koopman
<djk@tobit.co.uk>
Fri, 10 Dec 2021 10:45:23 +0000
(10:45 +0000)
committer
Dirk Koopman
<djk@tobit.co.uk>
Fri, 10 Dec 2021 10:45:23 +0000
(10:45 +0000)
Changes
patch
|
blob
|
history
cmd/show/log.pl
patch
|
blob
|
history
cmd/show/registered.pl
patch
|
blob
|
history
perl/DXChannel.pm
patch
|
blob
|
history
perl/DXCommandmode.pm
patch
|
blob
|
history
diff --git
a/Changes
b/Changes
index 1194b5dcd7b97a3fc86d5b658705ba1c06302ada..2bf1af042096988aa7f42d70703b2c7e32ae0e6b 100644
(file)
--- a/
Changes
+++ b/
Changes
@@
-1,5
+1,6
@@
08Dec21=======================================================================
1. Backport console.pl scrolling and width management changes.
08Dec21=======================================================================
1. Backport console.pl scrolling and width management changes.
+2. Backport show/registered cmd format from mojo.
06Dec21=======================================================================
1. Fix show/register to allow query of individual calls as well as get a
complete list.
06Dec21=======================================================================
1. Fix show/register to allow query of individual calls as well as get a
complete list.
diff --git
a/cmd/show/log.pl
b/cmd/show/log.pl
index 3ff4a50b25dfab2f55027caff8ebe7aba5bec1db..f8858583cecba50832ea85574bddd257ccd3cfd6 100644
(file)
--- a/
cmd/show/log.pl
+++ b/
cmd/show/log.pl
@@
-21,7
+21,7
@@
while ($f = shift @f) { # next field
next if $from && $to > $from;
}
unless ($to) {
next if $from && $to > $from;
}
unless ($to) {
- ($to) = $f =~ /^(\d+)$/
o
if !$to; # is it a to count?
+ ($to) = $f =~ /^(\d+)$/ if !$to; # is it a to count?
next if $to;
}
unless ($who) {
next if $to;
}
unless ($who) {
diff --git
a/cmd/show/registered.pl
b/cmd/show/registered.pl
index 929d014da692765bd5b4075a85029812afab03be..d375532462f5e2158fcf4c8c0082199c083581d8 100644
(file)
--- a/
cmd/show/registered.pl
+++ b/
cmd/show/registered.pl
@@
-36,13
+36,15
@@
unless (keys %call) {
foreach $key (sort keys %call) {
my $u = DXUser::get_current($key);
foreach $key (sort keys %call) {
my $u = DXUser::get_current($key);
- if ($u &&
$u->registered
) {
- push @val,
$key
;
+ if ($u &&
defined (my $r = $u->registered)
) {
+ push @val,
"${key}($r)"
;
++$count;
}
++$count;
}
+
}
my @l;
}
my @l;
+push @out, "Registration is " . ($main::reqreg ? "Required" : "NOT Required");
foreach my $call (@val) {
if (@l >= 5) {
push @out, sprintf "%-12s %-12s %-12s %-12s %-12s", @l;
foreach my $call (@val) {
if (@l >= 5) {
push @out, sprintf "%-12s %-12s %-12s %-12s %-12s", @l;
diff --git
a/perl/DXChannel.pm
b/perl/DXChannel.pm
index fedaee056d4815807f744748297b7b786f322300..40efdd245c5445be1e4c4c1fd06f81dac31267a0 100644
(file)
--- a/
perl/DXChannel.pm
+++ b/
perl/DXChannel.pm
@@
-746,6
+746,20
@@
sub handle_xml
return $r;
}
return $r;
}
+sub registered
+{
+ my $self = shift;
+
+ # the sysop is registered!
+ return 1 if $self->call eq $main::myalias || $self->call eq $main::mycall;
+
+ if ($main::reqreg) {
+ return $self->{registered};
+ } else {
+ return 1;
+ }
+}
+
#no strict;
sub AUTOLOAD
{
#no strict;
sub AUTOLOAD
{
diff --git
a/perl/DXCommandmode.pm
b/perl/DXCommandmode.pm
index cc694cc8821a970ad5bdcc217d7f7a84ccb3a1fe..3eb351951c628c705b6c6d0a79cb57323809e0ac 100644
(file)
--- a/
perl/DXCommandmode.pm
+++ b/
perl/DXCommandmode.pm
@@
-1251,19
+1251,6
@@
sub send_motd
$self->send_file($motd) if -e $motd;
}
$self->send_file($motd) if -e $motd;
}
-sub registered
-{
- my $self = shift;
-
- # the sysop is registered!
- return 1 if $self->call eq $main::myalias || $self->call eq $main::mycall;
-
- if ($main::reqreg) {
- return $self->{registered};
- } else {
- return 1;
- }
-}
1;
__END__
1;
__END__