X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fset%2Fpinginterval.pl;h=4d215747f48f4e7597a3e447b7ef0cb7b73b0eea;hb=ab811a0c902225075a9bd69749f65594079433a9;hp=8464cb26cce65beab24b3defaa97fecf9f36da99;hpb=7de34899527cbc4dfacdcc6452926b3d2d73792c;p=spider.git diff --git a/cmd/set/pinginterval.pl b/cmd/set/pinginterval.pl index 8464cb26..4d215747 100644 --- a/cmd/set/pinginterval.pl +++ b/cmd/set/pinginterval.pl @@ -3,7 +3,7 @@ # # Copyright (c) 1998 - Dirk Koopman # -# $Id$ +# # my ($self, $line) = @_; @@ -11,22 +11,32 @@ my @args = split /\s+/, $line; 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 < 9; +return (1, $self->msg('e5')) if $self->priv < 8; return (1, $self->msg('e14')) unless defined $val; return (1, $self->msg('e12')) unless @args; -$val *= 60 if $val < 120; +if ($val =~ /^(\d+)[sS]$/) { + $val = $1; +} elsif ($val =~ /^(\d+)[mM]$/) { + $val = $1 * 60; +} elsif ($val =~ /^(\d+)[hH]$/) { + $val = $1 * 60 * 60; +} elsif ($val =~ /^\d+$/) { + $val *= 60 if $val < 30; +} else { + return (1, $self->msg('e14')); +} foreach $call (@args) { $call = uc $call; - my $dxchan = DXChannel->get($call); + my $dxchan = DXChannel::get($call); $user = $dxchan->user if $dxchan; - $user = DXUser->get_exact($call) unless $user; + $user = DXUser::get($call) unless $user; if ($user) { - unless ($user->sort eq 'A' || $user->sort eq 'S') { + unless ($user->is_node) { push @out, $self->msg('e13', $call); next; }