* 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 = $$;
|
||||
}
|
||||
|
||||
# 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;
|
||||
|
||||
Reference in new issue
Block a user