# WARN: this file does not reload on HUP.
#
-# use strict; # TODO
+# TODO:
+# use strict;
use vars qw($who $msgType $conn $chan $message $ident $talkchannel
$bot_version $babel_lang_regex $bot_data_dir);
### COMMAND HOOK IMPLEMENTATION.
# addCmdHook("SECTION", 'TEXT_HOOK',
-# (CODEREF => 'Blah',
+# (CODEREF => 'Blah',
# Forker => 1,
# CheckModule => 1, # ???
# Module => 'blah.pl' # preload module.
'Forker' => 1, 'Identifier' => 'kernel',
'Cmdstats' => 'Kernel', 'NoArgs' => 1) );
&addCmdHook("extra", 'listauth', ('CODEREF' => 'CmdListAuth',
- 'Identifier' => 'search', Module => 'factoids',
+ 'Identifier' => 'search', Module => 'factoids',
'Help' => 'listauth') );
&addCmdHook("extra", 'quote', ('CODEREF' => 'Quote::Quote',
'Forker' => 1, 'Identifier' => 'quote',
'Forker' => 1) );
&addCmdHook("extra", '(botmail|message)', ('CODEREF' => 'botmail::parse',
'Identifier' => 'botmail', 'Cmdstats' => 'botmail') );
+&addCmdHook("extra", 'httpdtype', ('CODEREF' => 'HTTPDtype::HTTPDtype',
+ 'Identifier' => 'httpdtype', 'Cmdstats' => 'httpdtype',
+ 'Forker' => 1) );
###
### END OF ADDING HOOKS.
return;
}
- my $debiancmd = 'conflicts?|depends?|desc|file|d?info|provides?';
+ my $debiancmd = 'conflicts?|depends?|desc|file|(?:d)?info|provides?';
$debiancmd .= '|recommends?|suggests?|maint|maintainer';
if ($message =~ /^($debiancmd)(\s+(.*))?$/i) {
if (!defined $arg or $arg =~ /^\s*$/) {
# this is way fucking ugly.
- # TODO convert $where to hash
+ # TODO: convert $where to hash
my %hash = &sqlSelectColHash("stats", "nick,counter",
{ },
$where." ORDER BY counter DESC LIMIT 3", 1
&pSReply("zero counter for \037$type\037.");
}
} else {
- # TODO convert $where to hash and use a sqlSelect
+ # TODO: convert $where to hash and use a sqlSelect
my $x = (&sqlRawReturn("SELECT SUM(counter) FROM stats".
" WHERE $where AND nick=".&sqlQuote($arg) ))[0];
}
# defined.
- # TODO convert $where to hash
+ # TODO: convert $where to hash
my @array = &sqlSelect("stats", "nick", undef,
$where." ORDER BY counter", 1
);
return;
}
- # TODO add nick to where_href
+ # TODO: add nick to where_href
my %hash = &sqlSelectColHash("stats", "type,counter",
$where_href, " AND nick=".&sqlQuote($arg)
);
foreach (keys %hash) {
&DEBUG("_stats: hash{$_} => $hash{$_}");
# ranking.
- # TODO convert $where to hash
+ # TODO: convert $where to hash
my @array = &sqlSelect("stats", "nick", undef,
$where." ORDER BY counter", 1);
$good = 0;