Commits

Daniel Leining  committed 7562a1d

added piggy support

  • Participants
  • Parent commits cdf330a

Comments (0)

Files changed (1)

 sub _init {
 	cmd_add('KITTIE', 0, 0, \%M::Kittie::HELP_KITTIE, \&M::Kittie::kittie) or return;
 	cmd_add('KITTY', 0, 0, \%M::Kittie::HELP_KITTIE, \&M::Kittie::kittie) or return;
+	hook_add('on_cprivmsg', 'piggycheck', \&M::Kittie::on_cprivmsg) or return;
     return 1;
 }
 
 	privmsg($src->{svr}, $src->{chan}, decode('UTF-8', '=^._.^= ☆07P12U08R02R13F08E13C04T~☆ '));	
 }
 
+sub on_cprivmsg {
+	my ($src, $chan, @msg) = @_;
+	foreach (@msg) {
+		if (lc $_ =~ m/.*piggy.*/) {
+			privmsg($src->{svr}, $chan, ":@) WHAT'S SHAKIN, BACON? :@)");
+		}
+	}
+}
+
 # Start initialization.
 API::Std::mod_init('Kittie', 'daniel', '1.00', '3.0.0a11');
 # build: perl=5.010000