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