#!/usr/bin/perl -w use Irssi; use Irssi::Irc; $VERSION = "0.1"; %IRSSI = ( authors => 'johnny', contact => 'johnny@netvor.sk', name => 'allyourbase', description => 'All your base are belong to us!', license => 'BSD', url => 'http://netvor.sk/~johnny/', ); sub on_msg { my ($server, $msg, $nick, $addr, $target) = @_; $target = $nick if ( ! $target ); $nick = $server->{'nick'} if ($nick =~ /^#/); $target = lc($target); if ( ($msg =~ /what ha[p]+en/i ) ) { $server->command ("MSG $target Mechanic: Somebody set up us the bomb."); $server->command ("MSG $target Operator: We get signal."); } if ( ($msg =~ /main screen turn/i ) ) { $server->command ("MSG $target Captain: It's you!!"); } if ( ($msg =~ /^what[^ ]*$/i )) { $server->command ("MSG $target Operator: Main screen turn on."); } if ( ($msg =~ /it[']*s you/i ) ) { $server->command ("MSG $target Cats: How are you gentlemen!!"); $server->command ("MSG $target Cats: All your base are belong to us."); $server->command ("MSG $target Cats: You are on the way to destruction."); } if ( ($msg =~ /what you sa[yi]/i ) ) { $server->command ("MSG $target Cats: You have no chance to survive make your time."); $server->command ("MSG $target Cats: Ha ha ha ha..."); } if ( ($msg =~ /how are you gentlem[ae]n/i ) || ($msg =~ /all your base/i ) || ($msg =~ /you are on (the|your)* way to destruction/i ) ) { $server->command ("MSG $target Captain: What you say!!"); } if ( ($msg =~ /you have no chance/i ) || ($msg =~ /make your time/i ) ) { if (int (rand (2)) == 1) { $server->command ("MSG $target Captain: Move 'Zig'"); } else { $server->command ("MSG $target Captain: For great justice"); } } } Irssi::signal_add_last("message public", "on_msg");