my $itc;
$itc = &getChanConf("ircTextCounters");
$itc = &findChanConf("ircTextCounters") unless ($itc);
- if ($itc) {
- &do_text_counters($itc);
- return;
- }
+ return if ($itc && &do_text_counters($itc) == 1);
+ # end of text counters.
# list{keys|values}. xk++. Idea taken from #linuxwarez@EFNET
if ($message =~ /^list(\S+)(\s+(.*))?$/i) {
if ($message =~ /^_stats(\s+(\S+))$/i) {
&textstats_main($2);
- return;
+ return 1;
}
my ($type,$arg);
$type = $1;
$arg = $3;
} else {
- return;
+ return 0;
}
# even more uglier with channel/time arguments.
if (!defined $x) { # !defined.
&pSReply("$arg has not said $type yet.");
- return;
+ return 1;
}
# defined.
&pSReply("\002$arg\002 has said \037$type\037 \002$x\002 times (\002$pct1\002 %)$xtra");
}
- if ($@) {
- &DEBUG("regex failed: $@");
- return;
- }
+ return 1;
}
sub textstats_main {