aboutsummaryrefslogtreecommitdiff
path: root/Plugin/Introspect.pm
blob: 4c5398418b7b8e667d98fddf00d2775496e55676 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package Plugin::Introspect;

use strict;
use warnings;

my $root_config;

sub configure {
	my $self = shift;
	my $cmdref = shift;
	shift; # run_command
	shift; # module config
	$root_config = shift;

	$cmdref->("plugins", sub { $self->dump_plugins(@_); } );

	return $self;
}

sub dump_plugins {
	my ($self, $irc, $logger, $who, $where, $rest, @arguments) = @_;
	return "Plugins: " . join ", ", $root_config->{plugins};
}
1;