From: dms Date: Sat, 9 Mar 2002 14:40:23 +0000 (+0000) Subject: - Manually applied patch from Morten Brix Pedersen. Thanks. X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=48a6241ed909c93d25dabb2bf0fbf28d924a2af5;p=infobot.git - Manually applied patch from Morten Brix Pedersen. Thanks. - 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@556 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/blootbot/src/CommandStubs.pl b/blootbot/src/CommandStubs.pl index 1a55669..7f06814 100644 --- a/blootbot/src/CommandStubs.pl +++ b/blootbot/src/CommandStubs.pl @@ -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"; diff --git a/blootbot/src/DynaConfig.pl b/blootbot/src/DynaConfig.pl index c7b6f1d..d284165 100644 --- a/blootbot/src/DynaConfig.pl +++ b/blootbot/src/DynaConfig.pl @@ -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 = ; if ($ver !~ /^#v1/) { diff --git a/blootbot/src/Files.pl b/blootbot/src/Files.pl index e86d228..d51cecd 100644 --- a/blootbot/src/Files.pl +++ b/blootbot/src/Files.pl @@ -5,7 +5,7 @@ # Created: 19991221 # -if (&IsParam("useStrict")) { use strict; } +#use strict; # File: Language support. sub loadLang { diff --git a/blootbot/src/Misc.pl b/blootbot/src/Misc.pl index b36ac96..3585154 100644 --- a/blootbot/src/Misc.pl +++ b/blootbot/src/Misc.pl @@ -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; diff --git a/blootbot/src/Modules/Countdown.pl b/blootbot/src/Modules/Countdown.pl index abd1099..e805d8e 100644 --- a/blootbot/src/Modules/Countdown.pl +++ b/blootbot/src/Modules/Countdown.pl @@ -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 = diff --git a/blootbot/src/Modules/News.pl b/blootbot/src/Modules/News.pl index 6acebdb..9998c3c 100644 --- a/blootbot/src/Modules/News.pl +++ b/blootbot/src/Modules/News.pl @@ -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!"); diff --git a/blootbot/src/Modules/UserDCC.pl b/blootbot/src/Modules/UserDCC.pl index b5b64a6..8c45765 100644 --- a/blootbot/src/Modules/UserDCC.pl +++ b/blootbot/src/Modules/UserDCC.pl @@ -892,7 +892,7 @@ sub userDCC { $user = &getUser($args[0]); $mask = $args[1]; } else { # - # who or verifyUser. FIXME!!! + # who or verifyUser. FIXME (don't remember why) $user = &getUser($who); $mask = $args[0]; } diff --git a/blootbot/src/Net.pl b/blootbot/src/Net.pl index 09557c8..083d62b 100644 --- a/blootbot/src/Net.pl +++ b/blootbot/src/Net.pl @@ -5,8 +5,7 @@ # Created: 20000309 # -if (&IsParam("useStrict")) { use strict; } - +#use strict; use vars qw(%ftp); # Usage: &ftpGet($host,$dir,$file,[$lfile]); diff --git a/blootbot/src/Process.pl b/blootbot/src/Process.pl index e09f0f0..1a4b126 100644 --- a/blootbot/src/Process.pl +++ b/blootbot/src/Process.pl @@ -6,7 +6,7 @@ # process the incoming message # -if (&IsParam("useStrict")) { use strict; } +#use strict; sub process { $learnok = 0; # Able to learn? diff --git a/blootbot/src/Shm.pl b/blootbot/src/Shm.pl index adad484..6a29ff4 100644 --- a/blootbot/src/Shm.pl +++ b/blootbot/src/Shm.pl @@ -5,8 +5,7 @@ # Created: 20000124 # -if (&IsParam("useStrict")) { use strict; } - +#use strict; use POSIX qw(_exit); sub openSHM { diff --git a/blootbot/src/UserExtra.pl b/blootbot/src/UserExtra.pl index 23b2873..77f4480 100644 --- a/blootbot/src/UserExtra.pl +++ b/blootbot/src/UserExtra.pl @@ -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); diff --git a/blootbot/src/core.pl b/blootbot/src/core.pl index 8dc7d46..20ee8a1 100644 --- a/blootbot/src/core.pl +++ b/blootbot/src/core.pl @@ -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. diff --git a/blootbot/src/interface.pl b/blootbot/src/interface.pl index fe7551a..70331a7 100644 --- a/blootbot/src/interface.pl +++ b/blootbot/src/interface.pl @@ -4,8 +4,7 @@ # Author: # -### FIXME. -#if (&IsParam("useStrict")) { use strict; } +#use strict; sub whatInterface { if (!&IsParam("Interface") or $param{'Interface'} =~ /IRC/) { diff --git a/blootbot/src/modules.pl b/blootbot/src/modules.pl index b5cadd7..46521b0 100644 --- a/blootbot/src/modules.pl +++ b/blootbot/src/modules.pl @@ -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) {