All pastes #986901 Raw Edit

Someone

public text v1 · immutable
·published 2008-04-16 01:33 UTC
rendered paste body
use 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) ) {
    $server->command("msg #testing123 you used my name!");
  }
}

Irssi::signal_add("event privmsg", "server_msgs");