aboutsummaryrefslogtreecommitdiff
path: root/Plugin/Introspect.pm
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2018-09-03 16:17:21 +1200
committerDavid Phillips <david@sighup.nz>2018-09-03 16:17:21 +1200
commit105ea0350a8b65fe80044c1ba15e85c86688bab3 (patch)
treec0c6b5d0b7a26c82b492baf70f9c490c7fd938cf /Plugin/Introspect.pm
parent65694d185582c9a6558ea8bfee99e56a5721540b (diff)
downloadidalius-105ea0350a8b65fe80044c1ba15e85c86688bab3.tar.xz
Add missing Plugin::Introspect
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;