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

use strict;
use warnings;

sub configure {
	my $self = shift;
	my $cmdref = shift;

	$cmdref->($self, "ping", sub { $self->ping(@_); } );

	return $self;
}

sub ping {
	my ($self, $irc, $logger, $who, $where, $ided, $rest, $no_reenter, @arguments) = @_;
	my $nick = (split /!/, $who)[0];
	return "$nick: pong";
}
1;