Skip to content

Instantly share code, notes, and snippets.

@kaizoku
Created May 15, 2013 18:57
Show Gist options
  • Save kaizoku/5586373 to your computer and use it in GitHub Desktop.
Save kaizoku/5586373 to your computer and use it in GitHub Desktop.
sub yarr {
my ($server, $data, $nick, $address, $target) = @_;
my $reg = qr/(
(?(4) Y* | Y+)
A+
(?(4) R+ | R{2,})
(G+H+)?
)
|
(?:A+H+O+Y+)
|
(?:M+A+T+E+Y+)
(?:\:){0}
/iox;
if ($data =~ /$reg/) {
my $num = int(rand(4));
my $yarr = "YAARR" . ("R" x $num);
$server->command("msg $target $yarr");
}
}
Irssi::signal_add("message public", "yarr");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment