aboutsummaryrefslogtreecommitdiff
path: root/Plugin/Source.pm
blob: 87193051e6816e7afd6a77dafb9a6857d01f1cd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package Plugin::Source;

use strict;
use warnings;

sub configure {
	my $self = shift;
	my $cmdref = shift;
	my @source_commands = ("guts", "help", "source");
	$cmdref->($self, $_, sub { $self->source(@_); }) for @source_commands;
	return $self;
}

sub source {
	my ($self, $irc, $logger, $who, $where, $ided, $rest, @arguments) = @_;
	my @urls = (
		"https://git.nah.nz/idalius/",
		"https://gitlab.com/dphillips/idalius");
	my $help_message = "My guts can be browsed at: ";
	return $help_message . join " ", @urls;
}
1;