diff options
author | David Phillips <david@sighup.nz> | 2018-04-10 15:23:56 +1200 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2018-04-10 15:23:56 +1200 |
commit | 5504bcd369b33874c92e49c2383e5f73d1a5a702 (patch) | |
tree | 70b61649c80368e7eee0ab3a261a5c2da1d7440e /Plugin | |
parent | cd1fc57841deab0e9b8bcfad49d527c6b263534c (diff) | |
download | idalius-5504bcd369b33874c92e49c2383e5f73d1a5a702.tar.xz |
Add echo command
Diffstat (limited to 'Plugin')
-rw-r--r-- | Plugin/Echo.pm | 26 |
1 files changed, 26 insertions, 0 deletions
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; |