2 # set ping interval for this node
4 # Copyright (c) 1998 - Dirk Koopman
9 my ($self, $line) = @_;
10 my @args = split /\s+/, $line;
14 my $val = shift @args if @args;
17 return (1, $self->msg('e5')) if $self->priv < 8;
18 return (1, $self->msg('e14')) unless defined $val;
19 return (1, $self->msg('e12')) unless @args;
21 if ($val =~ /^(\d+)[sS]$/) {
23 } elsif ($val =~ /^(\d+)[mM]$/) {
25 } elsif ($val =~ /^(\d+)[hH]$/) {
27 } elsif ($val =~ /^\d+$/) {
28 $val *= 60 if $val < 30;
30 return (1, $self->msg('e14'));
33 foreach $call (@args) {
35 my $dxchan = DXChannel::get($call);
36 $user = $dxchan->user if $dxchan;
37 $user = DXUser::get($call) unless $user;
39 unless ($user->is_node) {
40 push @out, $self->msg('e13', $call);
45 $dxchan->pingint($val);
49 push @out, $self->msg('pingint', $call, $val);
51 push @out, $self->msg('e3', "Set/Pinginterval", $call);