aboutsummaryrefslogtreecommitdiff
path: root/Plugin/DevNull.pm
blob: 038929a4ac6c0606bb18c210380864e4bb320f2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package Plugin::DevNull;

use strict;
use warnings;

my $run_command;

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

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

	return $self;
}

sub hush {
	my ($self, $irc, $logger, $who, $where, $ided, $rest, @arguments) = @_;

	$run_command->($rest, $who, $where, $ided);

	return;
}
1;