mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-24 19:52:34 +01:00
Battleship: revert previous commit
This commit is contained in:
parent
8094db4f36
commit
e930c5a855
@ -373,11 +373,10 @@ sub player_left {
|
|||||||
sub send_message {
|
sub send_message {
|
||||||
my ($self, $to, $text, $delay) = @_;
|
my ($self, $to, $text, $delay) = @_;
|
||||||
|
|
||||||
$self->{pbot}->{conn}->notice($to, $text);
|
$delay = 0 if not defined $delay;
|
||||||
|
|
||||||
=cut
|
|
||||||
$delay //= 0 if not defined $delay;
|
|
||||||
my $botnick = $self->{pbot}->{registry}->get_value('irc', 'botnick');
|
my $botnick = $self->{pbot}->{registry}->get_value('irc', 'botnick');
|
||||||
|
|
||||||
my $message = {
|
my $message = {
|
||||||
nick => $botnick,
|
nick => $botnick,
|
||||||
user => 'battleship',
|
user => 'battleship',
|
||||||
@ -387,8 +386,8 @@ sub send_message {
|
|||||||
checkflood => 1,
|
checkflood => 1,
|
||||||
message => $text
|
message => $text
|
||||||
};
|
};
|
||||||
|
|
||||||
$self->{pbot}->{interpreter}->add_message_to_output_queue($to, $message, $delay);
|
$self->{pbot}->{interpreter}->add_message_to_output_queue($to, $message, $delay);
|
||||||
=cut
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub run_one_state {
|
sub run_one_state {
|
||||||
@ -921,8 +920,6 @@ sub show_battlefield {
|
|||||||
my $player1 = $self->{player}->[0]->{nick};
|
my $player1 = $self->{player}->[0]->{nick};
|
||||||
my $player2 = $self->{player}->[1]->{nick};
|
my $player2 = $self->{player}->[1]->{nick};
|
||||||
|
|
||||||
$self->{pbot}->{conn}->pacing(0);
|
|
||||||
|
|
||||||
if ($player == 0) {
|
if ($player == 0) {
|
||||||
$self->send_message(
|
$self->send_message(
|
||||||
$self->{player}->[$player]->{nick},
|
$self->{player}->[$player]->{nick},
|
||||||
@ -965,9 +962,6 @@ sub show_battlefield {
|
|||||||
elsif ($player == 2 || $player == 3) { $self->send_message($self->{channel}, $line); }
|
elsif ($player == 2 || $player == 3) { $self->send_message($self->{channel}, $line); }
|
||||||
else { $self->send_message($nick, $line); }
|
else { $self->send_message($nick, $line); }
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->{pbot}->{conn}->pacing(1);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# state subroutines
|
# state subroutines
|
||||||
|
Loading…
Reference in New Issue
Block a user