[SimBot-commits] CVS: simbot/plugins 8ball.pl,1.3,1.4
Status: Abandoned
Brought to you by:
kstange
|
From: Pete P. <fou...@us...> - 2005-08-14 01:42:42
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9664/plugins Modified Files: 8ball.pl Log Message: perltidy Index: 8ball.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/8ball.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -p -r1.3 -r1.4 --- 8ball.pl 24 Jul 2005 11:45:29 -0000 1.3 +++ 8ball.pl 14 Aug 2005 01:42:34 -0000 1.4 @@ -53,35 +53,35 @@ use constant BLANK_SAYINGS => ( # $nick will be replaced by the supplicant's nick use constant INTROS => ( q(pulls out a Magic 8 Ball and concentrates deeply on $nick's question:), - q(drops the magic 8 ball on the floor, catches it as it rolls away, and shows the answer to $nick's question:), +q(drops the magic 8 ball on the floor, catches it as it rolls away, and shows the answer to $nick's question:), q(vigorously shakes the 8-ball to find the answer to $nick's question:), -); #' - -use constant BLANK_INTROS => ( - q(pulls out a Magic 8 Ball and concentrates deeply on nothingness:), ); +use constant BLANK_INTROS => + ( q(pulls out a Magic 8 Ball and concentrates deeply on nothingness:), ); sub consult_the_8ball { - my ($kernel, $nick, $channel, undef, $question) = @_; - &SimBot::debug(3, "8ball: Consulting the Magic Eight Ball for $nick\n"); - + my ( $kernel, $nick, $channel, undef, $question ) = @_; + &SimBot::debug( 3, "8ball: Consulting the Magic Eight Ball for $nick\n" ); + my $message; - - if(defined $question) { - $message = &SimBot::pick((INTROS)) . ' ' . &SimBot::pick((SAYINGS)); + + if ( defined $question ) { + $message = &SimBot::pick( (INTROS) ) . ' ' . &SimBot::pick( (SAYINGS) ); } else { - $message = &SimBot::pick((BLANK_INTROS)) . ' ' . &SimBot::pick((BLANK_SAYINGS)); + $message = + &SimBot::pick( (BLANK_INTROS) ) . ' ' . &SimBot::pick( (BLANK_SAYINGS) ); } $message =~ s/\$nick/$nick/g; - - &SimBot::send_action($channel, $message); -} + + &SimBot::send_action( $channel, $message ); +} ## end sub consult_the_8ball # Register plugin -&SimBot::plugin_register(plugin_id => '8ball', - plugin_help => 'Consults the Magic 8 Ball. Be sure to ask a question!', - plugin_params => '<question>', - event_plugin_call => \&consult_the_8ball, - ); - \ No newline at end of file +&SimBot::plugin_register( + plugin_id => '8ball', + plugin_help => 'Consults the Magic 8 Ball. Be sure to ask a question!', + plugin_params => '<question>', + event_plugin_call => \&consult_the_8ball, +); + |