aboutsummaryrefslogtreecommitdiff
path: root/Plugin/Introspect.pm
blob: 05f338a53ce7e062ff126a56b2e0cc793c6e3fcc (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, $ided, $rest, @arguments) = @_;
	return "Plugins: " . join ", ", $root_config->{plugins};
}
1;