rendered paste bodyuse strict;
use vars qw($VERSION %IRSSI);
use Irssi;
$VERSION = '1.00';
%IRSSI = (
authors => 'Peter Greenwood',
contact => 'pjgat09@gmail.com',
name => 'Highlight Code',
license => 'Public Domain',
);
sub server_msgs {
my ($server, $data2, $nick, $address) = @_;
my ($target, $text) = split(/ :/, $data2, 2);
my $me = $server->{nick};
if ( ($text =~ /$me/i) ) {
$text =~ s/$me/($me)/g;
my $place;
if ($target =~ /^\#/) { $place = $target; } else { $place = "a PM"; }
$server->command("msg #testing123 " . "In " . $place . " " . $nick . " Wrote: " . $text);
}
}
Irssi::signal_add("event privmsg", "server_msgs");