diff options
Diffstat (limited to 'scripts/gimmie.pl')
| -rw-r--r-- | scripts/gimmie.pl | 38 | 
1 files changed, 38 insertions, 0 deletions
| diff --git a/scripts/gimmie.pl b/scripts/gimmie.pl new file mode 100644 index 0000000..f04f964 --- /dev/null +++ b/scripts/gimmie.pl @@ -0,0 +1,38 @@ +use Irssi; +use vars qw($VERSION %IRSSI); + +$VERSION = "1.0"; +%IRSSI = ( +    authors => 'PrincessLeia2', +    contact => 'lyz\@princessleia.com ', +    name => 'gimmie', +    description => 'a bot script, using ! followed by anything the script will say (as an action): gets nickname anything', +    license => 'GNU GPL v2 or later', +    url => 'http://www.princessleia.com/' +); + +sub event_privmsg { +my ($server, $data, $nick, $mask, $target) =@_; +my ($target, $text) = $data =~ /^(\S*)\s:(.*)/; +     return if ( $text !~ /^!/i ); +        if ( $text =~ /^!coffee$/i ) { +        	$server->command ( "action $target hands $nick a steaming cup of coffee" ); +	} +        elsif ($text =~ /^!chimay$/i ) { +        	$server->command ( "action $target hands $nick a glass of Chimay" ); +	} +        elsif ($text =~ /^!pepsi$/i ) { +        	$server->command ( "action $target gives $nick a can of Star Wars Pepsi" ); +	} +        elsif ($text =~ /^!ice cream$/i ) { +        	$server->command ( "action $target gives $nick a chocolate ice cream with lots of cherries" ); +	} +        elsif ($text =~ /^!$nick$/i ) { +        	$server->command ( "msg $target get yourself?" ); +	} +        else { +        	my ($gimmie) = $text =~ /!(.*)/; +        	$server->command ( "action $target Gets $nick $gimmie \0032<\%)"); +	} +} +Irssi::signal_add('event privmsg', 'event_privmsg'); | 
