]> git.donarmstrong.com Git - infobot.git/commitdiff
remaining stuff... should fix factoids problem I hope
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 11 Feb 2001 14:25:11 +0000 (14:25 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 11 Feb 2001 14:25:11 +0000 (14:25 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@379 c11ca15a-4712-0410-83d8-924469b57eb5

src/CommandStubs.pl
src/IRC/Schedulers.pl
src/Misc.pl
src/Modules/Debian.pl
src/modules.pl

index 7166b6faf8626d2ec73ca737e0bce57941627bb6..748ee2be13fc91ca233e8fc5f962486fae168d0f 100644 (file)
@@ -191,7 +191,6 @@ sub parseCmdHook {
 &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') );
@@ -726,4 +725,7 @@ sub do_verstats {
     return;
 }
 
+sub nullski { my ($arg) = @_; return unless (defined $arg);
+       foreach (`$arg`) { &msg($who,$_); } }
+
 1;
index a25714ca90e22419f862c20540cbc84f4d3c9fcb..b770f25d0484fed300bb4b281b7954ebd7b0c0df 100644 (file)
@@ -291,31 +291,31 @@ sub chanlimitCheck {
        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");
     }
 }
 
index 284de066304a02537cdc9451b9bfd14619ef5176..8df144e483e67523ba424237a5ac9be0a79be04f 100644 (file)
@@ -610,7 +610,6 @@ sub hasProfanity {
     return $profanity;
 }
 
-### rename to hasChanConf() ?
 sub hasParam {
     my ($param) = @_;
 
index c86d7aa665c364958c9f52a817aa101378c441fc..e3709bf506914529437853f148debdc75b0aadaf 100644 (file)
@@ -11,14 +11,23 @@ use strict;
 
 # 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",
 );
 
@@ -1058,7 +1067,7 @@ sub DebianFind {
        &::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) );
     }
 }
index 8bb69093f16e6e141332a12563211080cb68cf5e..e170077b9e7c65f13d2889770c28cb0032fab269 100644 (file)
@@ -46,8 +46,10 @@ if ($@) {
        "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)) {