Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created January 4, 2016 20:04
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 zoffixznet/7c2c6ac7f8a4902d97bb to your computer and use it in GitHub Desktop.
Save zoffixznet/7c2c6ac7f8a4902d97bb to your computer and use it in GitHub Desktop.
use IRC::Client;
use IRC::Client::Plugin;
use IRC::Art;
class Artist is IRC::Client::Plugin {
method irc-to-me ($irc, $e, %res) {
my $art = IRC::Art.new(10, 4); # A 4x4
$art.rectangle(0, 0, 3, 3, :color(4)); #draw a red square
$art.text("Woohoo 6.c", 1, 1, :color(13), :bold); # put the 6.c text starting at 1,1
$irc.respond: |%res, :what($_) for $art.result;
}
}
IRC::Client.new(
:debug
:host<irc.freenode.net>
:channels<#perl6>
:plugins( Artist.new )
).run;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment