aboutsummaryrefslogtreecommitdiff
path: root/Plugin/Introspect.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Plugin/Introspect.pm')
-rw-r--r--Plugin/Introspect.pm23
1 files changed, 23 insertions, 0 deletions
diff --git a/Plugin/Introspect.pm b/Plugin/Introspect.pm
new file mode 100644
index 0000000..2f42cb2
--- /dev/null
+++ b/Plugin/Introspect.pm
@@ -0,0 +1,23 @@
+package Plugin::Introspect;
+
+use strict;
+use warnings;
+
+my %config;
+
+sub configure {
+ my $self = shift;
+ my $cmdref = shift;
+ my $cref = shift;
+ %config = %$cref;
+
+ $cmdref->("plugins", sub { $self->dump_plugins(@_); } );
+
+ return $self;
+}
+
+sub dump_plugins {
+ my ($self, $irc, $logger, $who, $where, $rest, @arguments) = @_;
+ return "Plugins: " . join ", ", @{$config{plugins}};
+}
+1;