- print "\nThis is where you can define plugins. The plugin must already exist in the\n";
- print "plugins/ directory in order to add them here. A plugin name is the name of the\n";
- print "directory that it resides in. For example, if you have a plugin in the directory\n";
- print "plugins/myplug, the name is \"myplug\".\n\n";
- print "[plugins] command (?=help) > ";
- $input = <STDIN>;
- $input =~ s/[\r|\n]//g;
- while ($input ne "d") {
- if ($input =~ /^\s*l\s*/i) {
- $count = 0;
- while ($count <= $#plugins) {
- print " $count. $plugins[$count]\n";
- $count++;
- }
- print "\n";
- } elsif ($input =~ /^\s*\+/) {
- print "What is the name of this plugin: ";
- $name = <STDIN>;
- $name =~ s/[\r|\n]//g;
-
- if (-e "../plugins/$name") {
- $exists = 0;
- for ($m=0; $m <= $#plugins; $m++) {
- if ($plugins[$m] eq $name) {
- $exists = 1;
- }
+ $command =~ s/[\s|\n|\r]*//g;
+ if ($command > 0) {
+ $command = $command - 1;
+ if ($command <= $#plugins) {
+ @newplugins = ();
+ $ct=0;
+ while ($ct <= $#plugins) {
+ if ($ct != $command) {
+ @newplugins = (@newplugins, $plugins[$ct]);