* Module names are now case sensitive.

* Added config option module for auto-loading a module.
This commit is contained in:
Elijah Perrault committed 2011-01-29 14:34:38 -07:00
1 parent 49b81d0535
commit 0090e48ee4
3 files changed
+14 -5

No files matched your search

+9 -2
View File
@@ -166,6 +166,13 @@ else {
$APID = $$;
}
# Load modules.
alog "* Loading modules...";
dbug "* Loading modules...";
foreach (@{ (conf_get("module"))[0] }) {
mod_load($_);
}
## Create sockets.
alog "* Connecting to servers...";
dbug "* Connecting to servers...";
@@ -280,8 +287,8 @@ sub socksnd
sub mod_load {
my ($module) = @_;
if (-e "$Bin/../modules/".lc($module).".pm") {
do "$Bin/../modules/".lc($module).".pm" and return 1 or print $@ and return 0;
if (-e "$Bin/../modules/".$module.".pm") {
do "$Bin/../modules/".$module.".pm" and return 1 or print $@ and return 0;
}
else {
return 0;
+2
View File
@@ -3,6 +3,8 @@ Auto IRC Bot 3.0: Change Log
3.0 Indev
==================================================================
* Module names are now case sensitive.
* Added config option module for auto-loading a module.
* Fixed a bug in API::Log that caused invalid months.
* Changed how command data is passed to fix a bug.
* Removed dependency Async.
+3 -3
View File
@@ -23,9 +23,9 @@ sub parse
}
# Open, read and close the file.
open ALF, "<$Auto::Bin/../lang/$lang.alf" or return 0;
my @fbuf = <ALF>;
close ALF;
open(my $FALF, q{<}, "$Auto::Bin/../lang/$lang.alf") or return 0;
my @fbuf = <$FALF>;
close $FALF;
# Iterate the file buffer.
foreach my $buff (@fbuf) {