foreach (@grabbers, @getters) {
push(@matches, $_->{'NAME'}) if $_->{'NAME'} =~ m|^$word|;
};
+ } elsif ($linestart =~ m|^/videosite set (\w+)$|) {
+ my $module = $1;
+
+ foreach my $p (@getters, @grabbers) {
+ if ($p->{'NAME'} eq $module) {
+ @matches = $p->getparamlist($word);
+ last;
+ }
+ }
+ } elsif ($linestart =~ m|/videosite set (\w+) (\w+)$|) {
+ my $module = $1;
+ my $param = $2;
+
+ foreach my $p (@getters, @grabbers) {
+ if ($p->{'NAME'} eq $module) {
+ @matches = $p->getparamvalues($param, $word);
+ last;
+ }
+ }
}
+
push(@{$complist}, sort @matches);
${$want_space} = 0;
return $s;
}
+# Return a list of the parameters supported by the module
+# Does not return the 'enabled' parameter
+sub getparamlist {
+ my $self = shift;
+ my $word = shift;
+
+ return grep {$_ ne 'enabled' && /^$word/} keys %{$self->{'_PARAMS'}};
+}
+
+# Return a list of valid parameter values, if the parameter has
+# such a list.
+sub getparamvalues {
+ my $self = shift;
+ my $param = shift;
+ my $word = shift;
+
+ unless(exists($self->{'_PARAMS'}->{$param}->[2])) {
+ return ();
+ } else {
+ return grep {/^$word/} keys %{$self->{'_PARAMS'}->{$param}->[2]};
+ }
+}
+
+
sub gethelpstr {
my $self = shift;
my $s = 'Help for ' . $self->{'NAME'} . ":\n";