File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -24,14 +24,18 @@ sub roulette {
2424 ' body' => " ${nick} pulled the triggers... click" ,
2525 ' channel' => $channel ,
2626 );
27- if ( int rand ( 6 ) == 0 ) {
27+ if ( $self -> { ' roulette_session ' } -> { ' counter ' } == $self -> { ' roulette_session ' } -> { ' bullet ' } ) {
2828 $self -> kick($channel , $nick , ' BANG' );
2929 delete $self -> {' roulette_session' }-> {$channel };
30+ } else {
31+ $self -> {' roulette_session' }-> {' counter' }++;
3032 }
3133 }
3234 else {
3335 $self -> {' roulette_session' }-> {$channel } = 1;
34- return " $nick has started a game of roulette type !roulette in order to pull the trigger" ;
36+ $self -> {' roulette_session' }-> {' bullet' } = int ( rand ( 5 ) ) + 1;
37+ $self -> {' roulette_session' }-> {' counter' } = 1;
38+ return " $nick has started a game of roulette type !roulette in order to pull the trigger." ;
3539 }
3640 return undef ;
3741}
You can’t perform that action at this time.
0 commit comments