projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix xmlns path
[spider.git]
/
cmd
/
set
/
obscount.pl
diff --git
a/cmd/set/obscount.pl
b/cmd/set/obscount.pl
index ed5f6c4574c5cf27ec5db53a3a632f8b79651c6a..e37387fe12f4258bd58eed6de543659880a34bdd 100644
(file)
--- a/
cmd/set/obscount.pl
+++ b/
cmd/set/obscount.pl
@@
-11,32
+11,32
@@
my @args = split /\s+/, $line;
my $call;
my @out;
my $user;
my $call;
my @out;
my $user;
-my $val =
int
shift @args if @args;
+my $val = shift @args if @args;
return (1, $self->msg('e5')) if $self->priv < 8;
return (1, $self->msg('e5')) if $self->priv < 8;
-return (1, $self->msg('e
14')) unless defined $val
;
+return (1, $self->msg('e
25', 1, 9)) unless defined $val && $val =~ /^\d+$/ && $val >= 1 && $val <= 9
;
return (1, $self->msg('e12')) unless @args;
return (1, $self->msg('e12')) unless @args;
-$val *= 60 if $val < 120;
-
foreach $call (@args) {
$call = uc $call;
foreach $call (@args) {
$call = uc $call;
+ my $dxchan = DXChannel->get($call);
+ $user = $dxchan->user if $dxchan;
$user = DXUser->get_current($call);
if ($user) {
$user = DXUser->get_current($call);
if ($user) {
- unless ($user->
sort eq 'A' || $user->sort eq 'S'
) {
+ unless ($user->
is_node
) {
push @out, $self->msg('e13', $call);
next;
}
push @out, $self->msg('e13', $call);
next;
}
- $user->
pingint
($val);
+ $user->
nopings
($val);
if ($dxchan) {
if ($dxchan) {
- $dxchan->
pingint
($val);
+ $dxchan->
nopings
($val);
} else {
$user->close();
}
} else {
$user->close();
}
- push @out, $self->msg('
pingi
nt', $call, $val);
+ push @out, $self->msg('
obscou
nt', $call, $val);
} else {
} else {
- push @out, $self->msg('e3', "
Set/Pinginterval
", $call);
+ push @out, $self->msg('e3', "
set/obscount
", $call);
}
}
return (1, @out);
}
}
return (1, @out);