Add recheck all to vivivi

This commit is contained in:
root 2016-11-08 10:37:17 +01:00
parent 0a0a457e51
commit b337c2d0e7

View File

@ -276,6 +276,18 @@ sub on_public {
{
$conn->privmsg([ @to ], sprintf ( "ID inconnu: %d", $1 ) );
}
} elsif ($arg =~ /^(?:$mynick[,: ]|!)\s*recheck:?\s*all$/) {
#recheck all
for my $i ( 0..(@ACKS-1) )
{
next unless($ACKS[$i]);
my ( $host, $svc ) = @{ $ACKS[$i] || [ undef, undef ] };;
open CMDPIPE,">",$nagioscmd;
printf CMDPIPE "[%lu] SCHEDULE_FORCED_SVC_CHECK;%s;%s;%lu\n",time(),$host,$svc,time();
printf "[%lu] SCHEDULE_FORCED_SVC_CHECK;%s;%s;%lu\n",time(),$host,$svc,time();
close CMDPIPE;
$conn->privmsg([ @to ], sprintf ( "Recheck forcé pour %s: %s", $host, $svc ) );
}
} else {
$self->privmsg([ @to ], "Yo!");
}