blob: 38af3ead7c0aa1366ca53596b8465bd1e4a173b4 (
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
27
28
29
30
31
32
33
34
35
36
37
38
39
|
package Plugin::Men;
use strict;
use warnings;
my $config;
my $root_config;
sub configure {
my $self = shift;
shift; # cmdref
shift; # run_command
shift; # module config
$root_config = shift;
return $self;
}
sub on_message {
my ($self, $logger, $me, $who, $where, $raw_what, $what, $irc) = @_;
if (ref($where) eq "ARRAY") {
$where = $where->[0];
}
if ($what =~ /(\w*men\w*)/) {
my ($w, $c, $target);
$w = $c = $target = $1;
$w =~ s/men/women/;
$c =~ s/men/children/;
return "not just the $target, but the $w and $c too";
}
return;
}
sub on_action {
on_message(@_);
}
1;
|