]> git.donarmstrong.com Git - infobot.git/commitdiff
- Manually applied patch from Morten Brix Pedersen. Thanks.
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 9 Mar 2002 14:40:23 +0000 (14:40 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 9 Mar 2002 14:40:23 +0000 (14:40 +0000)
- replaced useStrict with commented "use strict;"
- hash ignore typo. Oops :)
- minor cosmetic update
- declare variables with "my" in certain local files.
- use mkdir instead of system("mkdir").  Forgot about this one.

git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@556 c11ca15a-4712-0410-83d8-924469b57eb5

14 files changed:
src/CommandStubs.pl
src/DynaConfig.pl
src/Files.pl
src/Misc.pl
src/Modules/Countdown.pl
src/Modules/News.pl
src/Modules/UserDCC.pl
src/Net.pl
src/Process.pl
src/Shm.pl
src/UserExtra.pl
src/core.pl
src/interface.pl
src/modules.pl

index 1a55669aef5b19ad323f1480aa82a45997506e3f..7f0681408a8ec6e931751aa53216e7f4f9d22cb9 100644 (file)
@@ -3,7 +3,7 @@
 # WARN: this file does not reload on HUP.
 #
 
-if (&IsParam("useStrict")) { use strict; }
+#use strict;
 
 $babel_lang_regex = "fr|sp|po|pt|it|ge|de|gr|en";
 
index c7b6f1dc0fc1c1963b82c26430f3308b3d3e2655..d284165099bee1ca60116c62e03d6994005aa106 100644 (file)
@@ -6,7 +6,7 @@
 #         NOTE: Merged from User.pl
 #
 
-if (&IsParam("useStrict")) { use strict; }
+#use strict;
 
 #####
 ##### USERFILE CONFIGURATION READER/WRITER
@@ -37,7 +37,7 @@ sub readUserFile {
 
     undef %users;      # clear on reload.
     undef %bans;       # reset.
-    undef %ingore;     # reset.
+    undef %ignore;     # reset.
 
     my $ver = <IN>;
     if ($ver !~ /^#v1/) {
index e86d22857466ddf26a8280af5aa893df11699caa..d51cecd98d37bdc778c48806a9048d091bc40e1b 100644 (file)
@@ -5,7 +5,7 @@
 #  Created: 19991221
 #
 
-if (&IsParam("useStrict")) { use strict; }
+#use strict;
 
 # File: Language support.
 sub loadLang {
index b36ac963cf94f102fef971fa67441b42519ff22e..358515467576b10dedebb1a9bac7906a406fe79d 100644 (file)
@@ -5,7 +5,7 @@
 #      NOTE: Based on code by Kevin Lenzo & Patrick Cole  (c) 1997
 #
 
-if (&IsParam("useStrict")) { use strict; }
+#use strict;
 
 sub help {
     my $topic = shift;
index abd1099934347b72358c2af06be6022fa058c4ca..e805d8e8d236278c8d7be77564a5e123d3061b24 100644 (file)
@@ -56,7 +56,7 @@ sub Countdown {
            $monname = qw(BAD Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)[(&dbRawReturn("SELECT extract(month from timestamp '$sqldate')"))[0]];
 
        } elsif ($param{'DBType'} =~ /^dbm$/i) {
-           &DEBUG("Countdown: FIXME!!!");
+           &FIXME("Countdown: no dbm support");
 #          $to_days = 
 #          $dayname = 
 #          $monname = 
index 6acebdb2759525ac3df9f4b1c8ceb86327a9daf1..9998c3c609989d844079c1feed295df901806e07 100644 (file)
@@ -15,7 +15,7 @@
 #      Text    - Actual text.
 ###
 
-use vars qw($who);
+use vars qw($who $chan);
 
 package News;
 
@@ -106,7 +106,7 @@ sub Parse {
        &set("$arg1 $1 $arg2");
 
     } elsif ($what =~ /^help(\s+(.*))?$/i) {
-       &::help("news$1");
+       &::help("news $2");
 
     } elsif ($what =~ /^newsflush$/i) {
        &::msg($who, "newsflush called... check out the logs!");
index b5b64a63b8dfb073925ce328eb042524b3466424..8c457651d38c04d59923557385492ab1160b201d 100644 (file)
@@ -892,7 +892,7 @@ sub userDCC {
            $user       = &getUser($args[0]);
            $mask       = $args[1];
        } else {                                # <mask>
-           # who or verifyUser. FIXME!!!
+           # who or verifyUser. FIXME (don't remember why)
            $user       = &getUser($who);
            $mask       = $args[0];
        }
index 09557c8388800ad72c80f4364df02ff71987785e..083d62be82dd7481f5b2968349085e566528c9fe 100644 (file)
@@ -5,8 +5,7 @@
 #  Created: 20000309
 #
 
-if (&IsParam("useStrict")) { use strict; }
-
+#use strict;
 use vars qw(%ftp);
 
 # Usage: &ftpGet($host,$dir,$file,[$lfile]);
index e09f0f079c8cc3a9d7ad2293150b3ec73b673c19..1a4b126764036c7639d11e53f2d0ea219ba61015 100644 (file)
@@ -6,7 +6,7 @@
 # process the incoming message
 #
 
-if (&IsParam("useStrict")) { use strict; }
+#use strict;
 
 sub process {
     $learnok   = 0;    # Able to learn?
index adad48427b7b425469f9993c8bb0b82dbd7b1676..6a29ff4b6aa85f0f1e12159d2bea4d8c8bce13a6 100644 (file)
@@ -5,8 +5,7 @@
 #   Created: 20000124
 #
 
-if (&IsParam("useStrict")) { use strict; }
-
+#use strict;
 use POSIX qw(_exit);
 
 sub openSHM {
index 23b287394c8e260a79a77333d52f9725d8b87f5b..77f4480fdac2565732adeb6ee83ebf2bd0c4067b 100644 (file)
@@ -5,8 +5,7 @@
 #      Created: 20000107
 #
 
-if (&IsParam("useStrict")) { use strict; }
-
+#use strict;
 use vars qw($message $arg $qWord $verb $lobotomized);
 use vars qw(%channels %chanstats %cmdstats);
 
index 8dc7d46935008ebea6816bb8fd0ec659d4f03526..20ee8a1b0db4656a1a895e7fac91d593c92281ab 100644 (file)
@@ -366,7 +366,7 @@ sub showProc {
        } else {        # delta < 0.
            $delta = -$delta;
            # never knew RSS could decrease, probably Size can't?
-           $str = "MEM:$prefix decreased by $delta kB. YES YES YES";
+           $str = "MEM:$prefix decreased by $delta kB.";
        }
 
        &status($str);
@@ -438,7 +438,7 @@ sub setupConfig {
 
     if (! -d $param{tempDir}) {
        &status("making $param{tempDir}...");
-       system("mkdir $param{tempDir}");
+       mkdir $param{tempDir}, 0755;
     }
 
     # static scalar variables.
index fe7551af12821120e88fa5bd542af1389b6d03ac..70331a79e88d437e8185b3a4c2eb327efe8c55b1 100644 (file)
@@ -4,8 +4,7 @@
 #       Author:
 #
 
-### FIXME.
-#if (&IsParam("useStrict")) { use strict; }
+#use strict;
 
 sub whatInterface {
     if (!&IsParam("Interface") or $param{'Interface'} =~ /IRC/) {
index b5cadd76d24d719a396f9f6caf11cc7c3cdb0cf1..46521b0661d54f514e19b8e1cd0efa695cadc586 100644 (file)
@@ -5,7 +5,7 @@
 #     Created: 20000624
 #
 
-if (&IsParam("useStrict")) { use strict; }
+#use strict;
 use vars qw($AUTOLOAD);
 
 ###
@@ -48,6 +48,8 @@ if ($@) {
        "babelfish"     => "babel.pl",
 );
 ### THIS IS NOT LOADED ON RELOAD :(
+my @myModulesLoadNow;
+my @myModulesReloadNot;
 BEGIN {
     @myModulesLoadNow  = ('topic', 'uptime', 'news', 'rootWarn');
     @myModulesReloadNot        = ('IRC/Irc.pl','IRC/Schedulers.pl');
@@ -237,7 +239,7 @@ sub reloadModule {
     }
 
     if (grep /$mod/, @myModulesReloadNot) {
-       &DEBUG("rM: SHOULD NOT RELOAD $mod!!!");
+       &DEBUG("rM: should not reload $mod");
        return;
     }
 
@@ -280,8 +282,8 @@ sub reloadModule {
 ### OPTIONAL MODULES.
 ###
 
-local %perlModulesLoaded  = ();
-local %perlModulesMissing = ();
+my %perlModulesLoaded  = ();
+my %perlModulesMissing = ();
 
 sub loadPerlModule {
     return 0 if (exists $perlModulesMissing{$_[0]});
@@ -308,7 +310,7 @@ sub loadMyModule {
        return 0; 
     }
 
-    my ($modulebase, $modulefile);
+    my ($modulename, $modulebase);
     if (exists $myModules{$tmp}) {
        ($modulename, $modulebase) = ($tmp, $myModules{$tmp});
     } else {
@@ -318,7 +320,7 @@ sub loadMyModule {
            $modulename = $tmp;
        }
     }
-    $modulefile = "$bot_src_dir/Modules/$modulebase";
+    my $modulefile = "$bot_src_dir/Modules/$modulebase";
 
     # call reloadModule() which checks age of file and reload.
     if (grep /\/$modulebase$/, keys %INC) {