&addCmdHook("extra", 'uptime', ('CODEREF' => 'uptime', 'Identifier' => 'uptime',
'Cmdstats' => 'Uptime') );
&addCmdHook("extra", 'nullski', ('CODEREF' => 'nullski', ) );
- sub nullski { my ($arg) = @_; foreach (`$arg`) { &msg($who,$_); } }
&addCmdHook("extra", '(fm|freshmeat)', ('CODEREF' => 'Freshmeat::Freshmeat',
'Identifier' => 'freshmeat', 'Cmdstats' => 'Freshmeat',
'Forker' => 1, 'Help' => 'freshmeat') );
return;
}
+sub nullski { my ($arg) = @_; return unless (defined $arg);
+ foreach (`$arg`) { &msg($who,$_); } }
+
1;
delete $sched{"chanlimitCheck"}{RUNNING};
}
- foreach ( &ChanConfList("chanlimitcheck") ) {
- next unless (&validChan($_));
+ foreach $chan ( &ChanConfList("chanlimitcheck") ) {
+ next unless (&validChan($chan));
- my $limitplus = &getChanConfDefault("chanlimitcheckPlus", 5, $_);
- my $newlimit = scalar(keys %{$channels{$_}{''}}) + $limitplus;
- my $limit = $channels{$_}{'l'};
+ my $limitplus = &getChanConfDefault("chanlimitcheckPlus", 5, $chan);
+ my $newlimit = scalar(keys %{$channels{$chan}{''}}) + $limitplus;
+ my $limit = $channels{$chan}{'l'};
- if (scalar keys %{$channels{$_}{''}} > $limit) {
+ if (defined $limit and scalar keys %{$channels{$chan}{''}} > $limit) {
&FIXME("LIMIT: set too low!!! FIXME");
### run NAMES again and flush it.
}
next unless (!defined $limit or $limit != $newlimit);
- if (!exists $channels{$_}{'o'}{$ident}) {
- &ERROR("chanlimitcheck: dont have ops on $_.");
+ if (!exists $channels{$chan}{'o'}{$ident}) {
+ &ERROR("chanlimitcheck: dont have ops on $chan.");
### TODO: check chanserv?
next;
}
if (!defined $limit) {
- &DEBUG("setting limit for first time or from netsplit for $_");
+ &DEBUG("setting limit for first time or from netsplit for $chan");
}
- &rawout("MODE $_ +l $newlimit");
+ &rawout("MODE $chan +l $newlimit");
}
}
return $profanity;
}
-### rename to hasChanConf() ?
sub hasParam {
my ($param) = @_;
# format: "alias=real".
my $announce = 0;
-my $defaultdist = "unstable";
+my $defaultdist = "sid";
my $refresh = &::getChanConfDefault("debianRefreshInterval",7)
* 60 * 60 * 24;
+### ... old
+#my %dists = (
+# "sid" => "unstable",
+# "woody" => "testing", # new since 20001219.
+# "potato" => "stable",
+# "incoming" => "incoming",
+#);
+
+### new... the right way.
my %dists = (
- "sid" => "unstable",
- "woody" => "testing", # new since 20001219.
- "potato" => "stable",
+ "unstable" => "sid",
+ "testing" => "woody", # new since 20001219.
+ "stable" => "potato",
"incoming" => "incoming",
);
&::status("searchPackage returned one result; getting info of package instead!");
&::Forker("debian", sub { &infoPackages("info", "$results[0] $dist"); } );
} else {
- my $prefix = "Debian Package Listing of '$str' ";
+ my $prefix = "Debian Package Listing of '$query' ";
&::pSReply( &::formListReply(0, $prefix, @results) );
}
}
"nickometer" => "nickometer.pl",
"babelfish" => "babel.pl",
);
-@myModulesLoadNow = ('topic', 'uptime',);
-@myModulesReloadNot = ('IRC/Irc.pl','IRC/Schedulers.pl');
+BEGIN {
+ @myModulesLoadNow = ('topic', 'uptime',);
+ @myModulesReloadNot = ('IRC/Irc.pl','IRC/Schedulers.pl');
+}
sub loadCoreModules {
if (!opendir(DIR, $bot_src_dir)) {