return;
}
+ if (!defined $int or $int =~ /^\D+$/) {
+ &WARN("fixPlural: int != defined or int");
+ return $str;
+ }
+
if ($str eq "has") {
$str = "have" if ($int > 1);
} elsif ($str eq "is") {
srand();
- if ($str =~ /^(\d+)$/) {
+ if ($str =~ /^(\d+(\.\d+)?)$/) {
my $i = $1;
my $fuzzy = int(rand 5);
if ($i < 10) {
sub isStale {
my ($file, $age) = @_;
+ if (!defined $age) {
+ &WARN("isStale: age == NULL.");
+ return 1;
+ }
+
return 1 unless ( -f $file);
return 1 if (time() - (stat($file))[9] > $age*60*60*24);
my $delta = time() - (stat($file))[9];
sub hasParam {
my ($param) = @_;
- ### TODO: specific reason why it failed.
if (&IsChanConf($param)) {
return 1;
} else {
+ ### TODO: specific reason why it failed.
&msg($who, "unfortunately, \002$param\002 is disabled in my configuration") unless ($addrchar);
return 0;
}