Skip to content

Instantly share code, notes, and snippets.

@tadzik
Created April 6, 2013 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tadzik/5325542 to your computer and use it in GitHub Desktop.
Save tadzik/5325542 to your computer and use it in GitHub Desktop.
use Net::IRC::Bot;
class Linker {
method said($ev) {
note "Event: ", $ev.perl;
if $ev.what ~~ /S(\d+)\:(\d+)/ {
$ev.msg: "Link: http://perlcabal.org/syn/S$0.html#line_$1"
}
}
}
Net::IRC::Bot.new(
nick => 'synopsebot',
server => 'irc.freenode.org',
channels => qw/#perl6/,
modules => (Linker.new),
debug => True,
).run;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment