use Irssi;

use vars qw($VERSION %IRSSI);

$VERSION = "1.0";
%IRSSI = (
    author => 'pleia2',
    contact => 'lyz@princessleia.com ',
    name => 'request',
    description => 'Gives the chatter things they request, with special responses.',
    license => 'GNU GPL v2 or later',
    url => 'http://www.princessleia.com'
);

sub event_privmsg {
my ($server, $data, $nick, $mask) =@_;
my ($target, $text) = $data =~ /^(\S*)\s:(.*)/;
%get = ( "!cookies" => "action $target hands $nick a plate of Lyz's cookies", "!coffee" => "action $target hands $nick a cup of MykBev's Coffee", "!email" => "MSG $target pleia2's email is: lyz\@princessleia.com", "!website" => "msg $target http://www.princessleia.com", "!chimay" => "action $target hands $nick a glass of Chimay", "!hug" => "action $target gives $nick a hug", "!pepsi" => "action $target gives $nick a can of Star Wars Pepsi", "!ice cream" => "action $target gives $nick a chocolate ice cream with lots of cherries", "!list", "KICK $target $nick This is not a filesharing channel, !list is not allowed.", "bbl" => "msg $target Take Care, May The Force Be With You", "moo" => "msg $target Is that $nick or is there a coew in here?", "hi R2D2" => "MSG $target Greetings $nick", "$nick" => "msg $target get yourself?");
foreach my $want (keys %get) {
    	next if ( $text !~ /^$want$/i );
        $server->command ( "$get{$want}" );
}
}

Irssi::signal_add('event privmsg', 'event_privmsg');
