From 5504bcd369b33874c92e49c2383e5f73d1a5a702 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Tue, 10 Apr 2018 15:23:56 +1200 Subject: Add echo command --- Plugin/Echo.pm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Plugin/Echo.pm (limited to 'Plugin') diff --git a/Plugin/Echo.pm b/Plugin/Echo.pm new file mode 100644 index 0000000..9b23af8 --- /dev/null +++ b/Plugin/Echo.pm @@ -0,0 +1,26 @@ +#!/usr/bin/env perl + +package Plugin::Echo; + +use strict; +use warnings; + +my %config; + +sub configure { + my $self = shift; + my $cmdref = shift; + my $cref = shift; + %config = %$cref; + + $cmdref->("echo", sub { $self->echo(@_); } ); + + return $self; +} + +sub echo { + my ($self, $logger, $who, $where, $rest, @arguments) = @_; + + return $rest; +} +1; -- cgit v1.1