# Sample plugin written in Perl
#

my %config;

sub create_config {
	open(STDOUT, ">/tmp/perl.log");
	print STDERR "test\n";
	my ($name, $configdata) = @_;
	$config{'message'} = "message filtered by $name, configdata=$configdata";
}

sub before_receive {
	my ($request, $response) = @_;
	print STDERR "in the plugin\n";
	my $q = $request->{'qe'};
	print STDERR "original message: $q->{'MESSAGE'}\n";
	$q->{'MESSAGE'} = $config{'message'};
	return 0;
}

