From d45fd39c8453c5d2ce850410da9351eaa5393bcc Mon Sep 17 00:00:00 2001
From: Joey Pabalinas <joeypabalinas@gmail.com>
Date: Tue, 31 Jul 2018 14:37:12 -1000
Subject: Source: Add source url command

Signed-off-by: Joey Pabalinas <joeypabalinas@gmail.com>
---
 Plugin/Source.pm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 Plugin/Source.pm

(limited to 'Plugin')

diff --git a/Plugin/Source.pm b/Plugin/Source.pm
new file mode 100644
index 0000000..97434dd
--- /dev/null
+++ b/Plugin/Source.pm
@@ -0,0 +1,24 @@
+#!/usr/bin/env perl
+
+package Plugin::Source;
+
+use strict;
+use warnings;
+
+my %config;
+
+sub configure {
+	my $self = shift;
+	my $cmdref = shift;
+	my @source_commands = ("guts", "help", "source");
+	$cmdref->($_, sub { $self->source(@_); }) for @source_commands;
+	return $self;
+}
+
+sub source {
+	my ($self, $logger, $who, $where, $rest, @arguments) = @_;
+	my @urls = ("https://gitlab.com/dphillips/idalius");
+	my $help_message = "My guts can be browsed at: ";
+	return $help_message . join " ", @urls;
+}
+1;
-- 
cgit v1.1