From 917cae2ffb0344d090b405abe46980b2c59a0eb5 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Fri, 22 Nov 2024 03:17:39 -0800 Subject: [PATCH] Plugin/Spinach: fix players exit game on `/part` and `/quit` --- lib/PBot/Plugin/Spinach.pm | 4 ++-- lib/PBot/VERSION.pm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/PBot/Plugin/Spinach.pm b/lib/PBot/Plugin/Spinach.pm index 637544d4..fa478549 100644 --- a/lib/PBot/Plugin/Spinach.pm +++ b/lib/PBot/Plugin/Spinach.pm @@ -112,7 +112,7 @@ sub on_kick($self, $event_type, $event) { sub on_departure($self, $event_type, $event) { my ($nick, $user, $host) = ($event->nick, $event->user, $event->host); my ($channel, $type) = (lc $event->to, uc $event->type); - return 0 if $type ne 'QUIT' and $channel ne $self->{channel}; + return 0 if $type eq 'QUIT' and $channel ne $self->{channel}; $self->player_left($nick, $user, $host); return 0; } @@ -1208,7 +1208,7 @@ sub run_one_state($self) { } if ($self->{current_state} ne 'nogame' && not @{$self->{state_data}->{players}}) { - $self->send_message($self->{channel}, "All players have left the game!"); + $self->send_message($self->{channel}, "All players have left. The game has been stopped."); $self->{current_state} = 'nogame'; $self->{pbot}->{event_queue}->update_repeating('spinach loop', 0); return; diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index 48c151f5..cf987f02 100644 --- a/lib/PBot/VERSION.pm +++ b/lib/PBot/VERSION.pm @@ -25,8 +25,8 @@ use PBot::Imports; # These are set by the /misc/update_version script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 4857, - BUILD_DATE => "2024-11-21", + BUILD_REVISION => 4858, + BUILD_DATE => "2024-11-22", }; sub initialize {}