Xchat figlet plug in


Well I thought it would be cool - its only like three lines anyway =) you do a "/fig hello" and something like this will appear on your IRC channel:
 _          _ _       
| |__   ___| | | ___  
| '_ \ / _ \ | |/ _ \ 
| | | |  __/ | | (_) |
|_| |_|\___|_|_|\___/ 

and of course if you do "/fig -f lean hello" then
    _/                  _/  _/           
   _/_/_/      _/_/    _/  _/    _/_/    
  _/    _/  _/_/_/_/  _/  _/  _/    _/   
 _/    _/  _/        _/  _/  _/    _/    
_/    _/    _/_/_/  _/  _/    _/_/       

cool huh? anyway the perl is below. Look at xchat for help.

WARNING the best way to use this plug in is to go to an irc server - go to #linux or #hackers and type "/fig I am here now" and everybody will give you deep respect and a pat on the back

#!/usr/bin/perl -w
IRC::register("SteveCs figlet script", "0.1", "", "");
IRC::print "Loading SteveCs figlet script 0.1\n";
IRC::add_command_handler("fig", "stevec_figlet");

sub stevec_figlet
{
        @a=`figlet @_`;
        for $b (@a){
                chop $b;
                IRC::command(" $b");	#don't just print $b if it starts
	}				#with a / or \ then the server
	return 1;			#might get angry and screw us up
}