mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 18:49:03 -04:00
Filter out modules not applicable to the installed inspircd version
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12625 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
516da6a00f
commit
a115cb04b7
@ -101,6 +101,18 @@ getmodules(1);
|
|||||||
# determine core version
|
# determine core version
|
||||||
`./src/version.sh` =~ /InspIRCd-([0-9.]+)/ or die "Cannot determine inspircd version";
|
`./src/version.sh` =~ /InspIRCd-([0-9.]+)/ or die "Cannot determine inspircd version";
|
||||||
$installed{core} = $1;
|
$installed{core} = $1;
|
||||||
|
for my $mod (keys %modules) {
|
||||||
|
MODVER: for my $mver (keys %{$modules{$mod}}) {
|
||||||
|
for my $dep (@{$modules{$mod}{$mver}{depends}}) {
|
||||||
|
next unless $dep =~ /^core (.*)/;
|
||||||
|
if (!ver_in_range($installed{core}, $1)) {
|
||||||
|
delete $modules{$mod}{$mver};
|
||||||
|
next MODVER;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
delete $modules{$mod} unless %{$modules{$mod}};
|
||||||
|
}
|
||||||
$modules{core}{$1} = {
|
$modules{core}{$1} = {
|
||||||
url => 'NONE',
|
url => 'NONE',
|
||||||
depends => [],
|
depends => [],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user