Fix messages "problemes enregistres" : handle singular form
This commit is contained in:
parent
2c69859d5a
commit
e89e58440b
@ -252,7 +252,13 @@ sub on_public {
|
||||
}
|
||||
} elsif ($arg =~ /^(?:$mynick[,: ]|!)\s*list\s*$/) {
|
||||
&refresh ();
|
||||
$conn->privmsg([ @to ], sprintf ( "%d problemes enregistres", ( scalar @ACKS )) );
|
||||
my $msg;
|
||||
if( scalar @ACKS == 0 or scalar @ACKS == 1) {
|
||||
$msg = "%d probleme enregistre";
|
||||
} else {
|
||||
$msg = "%d problemes enregistres";
|
||||
}
|
||||
$conn->privmsg([ @to ], sprintf ( $msg, ( scalar @ACKS )) );
|
||||
my $id = 0;
|
||||
foreach ( @ACKS )
|
||||
{
|
||||
@ -263,7 +269,13 @@ sub on_public {
|
||||
}
|
||||
} elsif ($arg =~ /^(?:$mynick[,: ]|!)\s*refresh\s*$/) {
|
||||
&refresh ();
|
||||
$conn->privmsg([ @to ], sprintf ( "%d problemes enregistres", ( scalar @ACKS )) );
|
||||
my $msg;
|
||||
if( scalar @ACKS == 0 or scalar @ACKS == 1) {
|
||||
$msg = "%d probleme enregistre";
|
||||
} else {
|
||||
$msg = "%d problemes enregistres";
|
||||
}
|
||||
$conn->privmsg([ @to ], sprintf ( $msg, ( scalar @ACKS )) );
|
||||
} elsif ($arg =~ /^(?:$mynick[,: ]|!)\s*recheck:?\s*(\d*)$/) {
|
||||
if ( $ACKS[$1] )
|
||||
{
|
||||
@ -274,7 +286,13 @@ sub on_public {
|
||||
close CMDPIPE;
|
||||
$conn->privmsg([ @to ], sprintf ( "Recheck forcé pour %s: %s", $host, $svc ) );
|
||||
&refresh ();
|
||||
$conn->privmsg([ @to ], sprintf ( "%d problemes enregistres", ( scalar @ACKS )) );
|
||||
my $msg;
|
||||
if( scalar @ACKS == 0 or scalar @ACKS == 1) {
|
||||
$msg = "%d probleme enregistre";
|
||||
} else {
|
||||
$msg = "%d problemes enregistres";
|
||||
}
|
||||
$conn->privmsg([ @to ], sprintf ( $msg, ( scalar @ACKS )) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -283,7 +301,13 @@ sub on_public {
|
||||
} elsif ($arg =~ /^(?:$mynick[,: ]|!)\s*recheck:?\s*all$/) {
|
||||
#recheck all
|
||||
&refresh ();
|
||||
$conn->privmsg([ @to ], sprintf ( "%d problemes enregistres", ( scalar @ACKS )) );
|
||||
my $msg;
|
||||
if( scalar @ACKS == 0 or scalar @ACKS == 1) {
|
||||
$msg = "%d probleme enregistre";
|
||||
} else {
|
||||
$msg = "%d problemes enregistres";
|
||||
}
|
||||
$conn->privmsg([ @to ], sprintf ( $msg, ( scalar @ACKS )) );
|
||||
for my $i ( 0..(@ACKS-1) )
|
||||
{
|
||||
next unless($ACKS[$i]);
|
||||
|
Loading…
Reference in New Issue
Block a user