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*$/) {
|
} elsif ($arg =~ /^(?:$mynick[,: ]|!)\s*list\s*$/) {
|
||||||
&refresh ();
|
&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;
|
my $id = 0;
|
||||||
foreach ( @ACKS )
|
foreach ( @ACKS )
|
||||||
{
|
{
|
||||||
@ -263,7 +269,13 @@ sub on_public {
|
|||||||
}
|
}
|
||||||
} elsif ($arg =~ /^(?:$mynick[,: ]|!)\s*refresh\s*$/) {
|
} elsif ($arg =~ /^(?:$mynick[,: ]|!)\s*refresh\s*$/) {
|
||||||
&refresh ();
|
&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*)$/) {
|
} elsif ($arg =~ /^(?:$mynick[,: ]|!)\s*recheck:?\s*(\d*)$/) {
|
||||||
if ( $ACKS[$1] )
|
if ( $ACKS[$1] )
|
||||||
{
|
{
|
||||||
@ -274,7 +286,13 @@ sub on_public {
|
|||||||
close CMDPIPE;
|
close CMDPIPE;
|
||||||
$conn->privmsg([ @to ], sprintf ( "Recheck forcé pour %s: %s", $host, $svc ) );
|
$conn->privmsg([ @to ], sprintf ( "Recheck forcé pour %s: %s", $host, $svc ) );
|
||||||
&refresh ();
|
&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
|
else
|
||||||
{
|
{
|
||||||
@ -283,7 +301,13 @@ sub on_public {
|
|||||||
} elsif ($arg =~ /^(?:$mynick[,: ]|!)\s*recheck:?\s*all$/) {
|
} elsif ($arg =~ /^(?:$mynick[,: ]|!)\s*recheck:?\s*all$/) {
|
||||||
#recheck all
|
#recheck all
|
||||||
&refresh ();
|
&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) )
|
for my $i ( 0..(@ACKS-1) )
|
||||||
{
|
{
|
||||||
next unless($ACKS[$i]);
|
next unless($ACKS[$i]);
|
||||||
|
Loading…
Reference in New Issue
Block a user