#8-ball / decision ball
#
#What is this?
#
#The 8-ball (Eight-ball) is a decision ball which i bought
#in a gadget shop when i was in London. I then came up with
#the idea to make an irc-version of this one :)
#There are 16 possible answers that the ball may give you.
#
#
#usage
#
#Anyone in the same channel as the one who runs this script may
#write "8-ball: question ?" without quotes and where question is
#a question to ask the 8-ball.
#An answer is given randomly. The possible answers are the exact
#same answers that the real 8-ball gives.
#
#Write "8-ball" without quotes to have the the ball tell you
#how money questions it've got totally.
#
#Write "8-ball version" without quotes to have him tell what
#his version is.
#
#
use strict;
use vars qw($VERSION %IRSSI);
use Irssi qw(command_bind signal_add);
use IO::File;
$VERSION = '0.20';
%IRSSI = (
author => 'Patrik Jansson',
contact => 'gein@knivby.nu',
name => '8-ball',
descriotion => 'Dont like to take decisions? Have the 8-ball do
it for you instead.',
license => 'GPL',
);
#sub own_question {
# my ($server, $msg, $target) = @_;
# question($server, $msg, "", $target);
#}
#sub public_question {
# my ($server, $msg, $nick, $address, $target) = @_;
# question($server, $msg, $nick.": ", $target);
#}
sub question($server, $msg, $nick, $target) {
my ($server, $msg, $nick, $target) = @_;
$_ = $msg;
if (!/^boobs/i) { return 0; }
if (/^boobs/i) {
$server->command('msg '.$target.' '.$nick.'did someone say boobs');
}
}
#signal_add("message public", "public_question");
signal_add("message own_public", "question");