Skip to content
Extraits de code Groupes Projets
Valider e735b6a1 rédigé par Aorimn's avatar Aorimn
Parcourir les fichiers

Modifs mineures

parent ce9449c5
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -203,15 +203,15 @@ sub reload_command ...@@ -203,15 +203,15 @@ sub reload_command
my $line = <FILE>; my $line = <FILE>;
chomp $line; chomp $line;
close FILE;
$package = $1 if($line =~ /^\s*package\s+([A-Za-z:_-]+)\s*;/i); $package = $1 if($line =~ /^\s*package\s+([A-Za-z:_-]+)\s*;/i);
$command = $1 if($line =~ /#.*?commands?\s*=\s*([^ ]+)/i); $command = $1 if($line =~ /#.*?commands?\s*=\s*([^ ]+)/i);
$perm = $1 if($line =~ /#.*?rights?\s*=\s*([^ ]+)/i); $perm = $1 if($line =~ /#.*?rights?\s*=\s*([^ ]+)/i);
close FILE;
# Mise en cache de la commande et de ses caractéristiques # Mise en cache de la commande et de ses caractéristiques
if(defined($command) && $command ne "" && defined($package) && $package ne "") if(defined($command) && defined($package))
{ {
my @commands = (); my @commands = ();
if($command =~ /[,;]/) if($command =~ /[,;]/)
...@@ -224,7 +224,6 @@ sub reload_command ...@@ -224,7 +224,6 @@ sub reload_command
} }
$::logger->debug("$file: package=$package; perms=$perm"); $::logger->debug("$file: package=$package; perms=$perm");
# $package = defined($package) ? $package : ucfirst substr $file, 0, -3;
my $main = ""; my $main = "";
my $save = ""; my $save = "";
...@@ -259,6 +258,17 @@ sub reload_command ...@@ -259,6 +258,17 @@ sub reload_command
$self->{'_loaded_commands'}->{$commands[0]}->{"dbg"} = \&{$package."::".$dbg} $self->{'_loaded_commands'}->{$commands[0]}->{"dbg"} = \&{$package."::".$dbg}
if(defined($dbg) && $dbg ne ""); if(defined($dbg) && $dbg ne "");
} }
else
{
if(!defined($command))
{
$::logger->debug("Undefined command, abort loading.");
}
if(!defined($package))
{
$::logger->debug("Undefined package, abort loading.");
}
}
return 1; return 1;
} # Fin reload_command } # Fin reload_command
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter