diff --git a/bin/auto b/bin/auto index ce2ba71..662849a 100755 --- a/bin/auto +++ b/bin/auto @@ -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; diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 668e010..2d64177 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -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. diff --git a/src/Parser/Lang.pm b/src/Parser/Lang.pm index 363b50e..6664fe9 100644 --- a/src/Parser/Lang.pm +++ b/src/Parser/Lang.pm @@ -23,9 +23,9 @@ sub parse } # Open, read and close the file. - open ALF, "<$Auto::Bin/../lang/$lang.alf" or return 0; - my @fbuf = ; - 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) {