3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-23 19:22:40 +01:00

Plugins/Connect4: play no longer results in "No such factoid"

This commit is contained in:
Pragmatic Software 2020-03-17 23:03:07 -07:00
parent 8c3f600e72
commit 8ddd96c77d

View File

@ -135,8 +135,6 @@ sub connect4_cmd {
($command, $arguments, $options) = split / /, $arguments, 3; ($command, $arguments, $options) = split / /, $arguments, 3;
$command = lc $command; $command = lc $command;
my ($channel, $result);
given ($command) { given ($command) {
when ('help') { when ('help') {
given ($arguments) { given ($arguments) {
@ -315,6 +313,7 @@ sub connect4_cmd {
$self->{state_data}->{counter} = 0; $self->{state_data}->{counter} = 0;
} }
} }
return "";
} }
when ('board') { when ('board') {
@ -327,7 +326,7 @@ sub connect4_cmd {
if ($self->{state_data}->{players}->[$i]->{id} == $id) { if ($self->{state_data}->{players}->[$i]->{id} == $id) {
$self->send_message($self->{channel}, "$nick surveys the board!"); $self->send_message($self->{channel}, "$nick surveys the board!");
$self->show_board; $self->show_board;
return; return "";
} }
} }
@ -337,7 +336,7 @@ sub connect4_cmd {
default { return $usage; } default { return $usage; }
} }
return $result; return "";
} }
sub player_left { sub player_left {