NAME

Bot::Cobalt::Plugin::Figlet - Bot::Cobalt plugin for displaying figlets

VERSION

version 0.001

SYNOPSIS

## In plugins.conf
Figlet:
   Module: Bot::Cobalt::Plugin::Figlet
   Opts:
      fontdir: var/fonts # default: /usr/games/lib/figlet
      maxwidth: 160      # default: -1 (no maxwidth)

DESCRIPTION

A Bot::Cobalt plugin.

This plugin provides commands to turn text into figlets and broadcast them in the channel.

It has two commands:

!figlet Hello, world!

This command text a message, randomly chooses a figlet from the font directory and uses it to 'figify' the message via Text::FIGlet.

!prev_figlet

Broadcasts the name of the previous figlet used.

TROUBLESHOOTING

As of Bot::Cobalt 0.016002 there is a problem with Bot::Cobalt::IRC and it's use of POE::Component::IRC::State. Since figlets are multiple lines of text the flood check limits the figlet's broadcast pretty significantly, to the point of unusability.

A workaround is to modify Bot::Cobalt::IRC to turn pass in flood => 1 to the spawning of POE::Component::IRC::State:

At around line 213 of Bot::Cobalt::IRC simply change:

my %spawn_opts = (
   resolver => core->resolver,
+  flood    => 1,

Thanks to Jon Portnoy <avenj@cobaltirc.org> for tracking this down.

AUTHOR

Scott Miller <scott.j.miller@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Scott Miller.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.