- 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
# 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";
# NOTE: Merged from User.pl
#
-if (&IsParam("useStrict")) { use strict; }
+#use strict;
#####
##### USERFILE CONFIGURATION READER/WRITER
undef %users; # clear on reload.
undef %bans; # reset.
- undef %ingore; # reset.
+ undef %ignore; # reset.
my $ver = <IN>;
if ($ver !~ /^#v1/) {
# Created: 19991221
#
-if (&IsParam("useStrict")) { use strict; }
+#use strict;
# File: Language support.
sub loadLang {
# NOTE: Based on code by Kevin Lenzo & Patrick Cole (c) 1997
#
-if (&IsParam("useStrict")) { use strict; }
+#use strict;
sub help {
my $topic = shift;
$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 =
# Text - Actual text.
###
-use vars qw($who);
+use vars qw($who $chan);
package News;
&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!");
$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];
}
# Created: 20000309
#
-if (&IsParam("useStrict")) { use strict; }
-
+#use strict;
use vars qw(%ftp);
# Usage: &ftpGet($host,$dir,$file,[$lfile]);
# process the incoming message
#
-if (&IsParam("useStrict")) { use strict; }
+#use strict;
sub process {
$learnok = 0; # Able to learn?
# Created: 20000124
#
-if (&IsParam("useStrict")) { use strict; }
-
+#use strict;
use POSIX qw(_exit);
sub openSHM {
# Created: 20000107
#
-if (&IsParam("useStrict")) { use strict; }
-
+#use strict;
use vars qw($message $arg $qWord $verb $lobotomized);
use vars qw(%channels %chanstats %cmdstats);
} 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);
if (! -d $param{tempDir}) {
&status("making $param{tempDir}...");
- system("mkdir $param{tempDir}");
+ mkdir $param{tempDir}, 0755;
}
# static scalar variables.
# Author:
#
-### FIXME.
-#if (&IsParam("useStrict")) { use strict; }
+#use strict;
sub whatInterface {
if (!&IsParam("Interface") or $param{'Interface'} =~ /IRC/) {
# Created: 20000624
#
-if (&IsParam("useStrict")) { use strict; }
+#use strict;
use vars qw($AUTOLOAD);
###
"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');
}
if (grep /$mod/, @myModulesReloadNot) {
- &DEBUG("rM: SHOULD NOT RELOAD $mod!!!");
+ &DEBUG("rM: should not reload $mod");
return;
}
### OPTIONAL MODULES.
###
-local %perlModulesLoaded = ();
-local %perlModulesMissing = ();
+my %perlModulesLoaded = ();
+my %perlModulesMissing = ();
sub loadPerlModule {
return 0 if (exists $perlModulesMissing{$_[0]});
return 0;
}
- my ($modulebase, $modulefile);
+ my ($modulename, $modulebase);
if (exists $myModules{$tmp}) {
($modulename, $modulebase) = ($tmp, $myModules{$tmp});
} else {
$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) {