next;
}
- if (/hasParam\(['"](\S+?)['"]\)/) {
- print "File: $file: hasParam: $1\n" if $debug;
+ if (/IsChanConfOrWarn\(['"](\S+?)['"]\)/) {
+ print "File: $file: IsChanConfOrWarn: $1\n" if $debug;
$param{$1}++;
next;
}
next;
}
- # command hooks => hasParam => both.
+ # command hooks => IsChanConfOrWarn => both.
# note: this does not support multiple lines.
if (/\'Identifier\'[\s\t]=>[\s\t]+\'(\S+?)\'/) {
print "File: $file: command hook: $1\n" if $debug;
### IDENTIFIER.
if (exists $hash{'Identifier'}) {
- return 1 unless (&hasParam($hash{'Identifier'}));
+ return 1 unless (&IsChanConfOrWarn($hash{'Identifier'}));
}
### USER FLAGS.
$debiancmd .= '|recommends?|suggests?|maint|maintainer';
if ($message =~ /^($debiancmd)(\s+(.*))?$/i) {
- return unless (&hasParam('Debian'));
+ return unless (&IsChanConfOrWarn('Debian'));
my $package = lc $3;
if (defined $package) {
# google searching. Simon++
if ($message =~ /^(?:search\s+)?($w3search_regex)\s+(?:for\s+)?['"]?(.*?)["']?\s*\?*$/i) {
- return unless (&hasParam('W3Search'));
+ return unless (&IsChanConfOrWarn('W3Search'));
&Forker('W3Search', sub { &W3Search::W3Search($1,$2); } );
# list{keys|values}. xk++. Idea taken from #linuxwarez@EFNET
if ($message =~ /^list(\S+)(\s+(.*))?$/i) {
- return unless (&hasParam('Search'));
+ return unless (&IsChanConfOrWarn('Search'));
my $thiscmd = lc $1;
my $args = $3 || "";
# Nickometer. Adam Spiers++
if ($message =~ /^(?:lame|nick)ometer(?: for)? (\S+)/i) {
- return unless (&hasParam("nickometer"));
+ return unless (&IsChanConfOrWarn("nickometer"));
my $term = (lc $1 eq 'me') ? $who : $1;
# Topic management. xk++
# may want to add a userflags for topic. -xk
if ($message =~ /^topic(\s+(.*))?$/i) {
- return unless (&hasParam('Topic'));
+ return unless (&IsChanConfOrWarn('Topic'));
my $chan = $talkchannel;
my @args = split / /, $2 || "";
# wingate.
if ($message =~ /^wingate$/i) {
- return unless (&hasParam('Wingate'));
+ return unless (&IsChanConfOrWarn('Wingate'));
my $reply = "Wingate statistics: scanned \002"
.scalar(keys %wingate)."\002 hosts";
# karma. set...
if ($msgType =~ /public/i && $message =~ /^(\S+)(--|\+\+)\s*$/ &&
- $addressed && &hasParam("karma")
+ $addressed && &IsChanConfOrWarn("karma")
) {
# to request factoids such as "g++" or "libstdc++", append "?" to the query.
my ($term,$inc) = (lc $1,$2);
# conversion: ascii.
if ($message =~ /^(asci*|chr) (\d+)$/) {
&DEBUG("ascii/chr called ...");
- return unless (&hasParam("allowConv"));
+ return unless (&IsChanConfOrWarn("allowConv"));
&DEBUG("ascii/chr called");
# conversion: ord.
if ($message =~ /^ord(\s+(.*))$/) {
- return unless (&hasParam("allowConv"));
+ return unless (&IsChanConfOrWarn("allowConv"));
$arg = $2;
# hex.
if ($message =~ /^hex(\s+(.*))?$/i) {
- return unless (&hasParam("allowConv"));
+ return unless (&IsChanConfOrWarn("allowConv"));
my $arg = $2;
if (!defined $arg) {