rendered paste bodyuse Irssi;
use strict;
use vars qw($VERSION %IRSSI);
$VERSION = '0.1';
%IRSSI = (
authors => 'Michael Simmons',
contact => '',
name => 'Dance',
description => 'Dancing Stick figure',
license => 'Public Domain',
);
print "Stick Dancer";
#extended from the smiley script
sub gen_dance {
my ($data, $server, $witem) = @_;
my @legs;
my @arms;
my @heads;
my $string;
my $i;
# @legs = ('<', '>', '|', '/', '\\' );
# @arms = @legs;
# @heads = (':)',':D',';D',':P',':>','=D','=)',':E',':]');
@legs = ('<', '|');
@arms = ('>', '/', '\\');
@heads = (':)', ':D', ':P');
if ($witem) {
for ($i = 0; $i < 5; $i++) {
$string = "";
$string .= $heads[rand(@heads)];
$string .= $arms[rand(@arms)];
$string .= '-';
$string .= $legs[rand(@legs)];
$witem->command("MSG ".$witem->{name}." ".$string);
}
} else {
Irssi::print("No active channel or query in this window.");
}
}
Irssi::command_bind('dance', 'gen_dance');