aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Plugin/DevNull.pm29
1 files changed, 29 insertions, 0 deletions
diff --git a/Plugin/DevNull.pm b/Plugin/DevNull.pm
new file mode 100644
index 0000000..e8a51e7
--- /dev/null
+++ b/Plugin/DevNull.pm
@@ -0,0 +1,29 @@
+package Plugin::DevNull;
+
+use strict;
+use warnings;
+
+my %config;
+my $run_command;
+
+sub configure {
+ my $self = shift;
+ my $cmdref = shift;
+ my $cref = shift;
+ $run_command = shift;
+ %config = %$cref;
+
+ $cmdref->("hush", sub { $self->hush(@_); } );
+ $cmdref->("devnull", sub { $self->hush(@_); } );
+
+ return $self;
+}
+
+sub hush {
+ my ($self, $irc, $logger, $who, $where, $rest, @arguments) = @_;
+
+ $run_command->($rest);
+
+ return;
+}
+1;