]> git.p6c8.net - devedit.git/commitdiff
Commands are now case-insensitive
authorpcanterino <>
Tue, 27 Jul 2004 12:30:46 +0000 (12:30 +0000)
committerpcanterino <>
Tue, 27 Jul 2004 12:30:46 +0000 (12:30 +0000)
modules/Command.pm

index d0070c428c2989179869c364b90bd8a43319a5be..17f94709872e53531f78deb6f350fd6c77948af9 100644 (file)
@@ -6,7 +6,7 @@ package Command;
 # Execute Dev-Editor's commands
 #
 # Author:        Patrick Canterino <patshaping@gmx.net>
 # Execute Dev-Editor's commands
 #
 # Author:        Patrick Canterino <patshaping@gmx.net>
-# Last modified: 2004-07-22
+# Last modified: 2004-07-27
 #
 
 use strict;
 #
 
 use strict;
@@ -61,10 +61,16 @@ sub exec_command($$$)
 {
  my ($command,$data,$config) = @_;
 
 {
  my ($command,$data,$config) = @_;
 
- return error($config->{'errors'}->{'cmd_unknown'},'/',{COMMAND => $command}) unless($dispatch{$command});
+ foreach(keys(%dispatch))
+ {
+  if(lc($_) eq lc($command))
+  {
+   my $output = &{$dispatch{$_}}($data,$config);
+   return $output;
+  }
+ }
 
 
- my $output = &{$dispatch{$command}}($data,$config);
- return $output;
+ return error($config->{'errors'}->{'cmd_unknown'},'/',{COMMAND => $command});
 }
 
 # exec_show()
 }
 
 # exec_show()

patrick-canterino.de