From 003d8d6dea9315d565fb0fe8ab68da7c45427790 Mon Sep 17 00:00:00 2001 From: Ailin Nemui Date: Wed, 3 Nov 2021 22:28:48 +0100 Subject: [PATCH] fix karma 1 bug in B::BB::P::M::Karma --- lib/Bot/BasicBot/Pluggable/Module/Karma.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/Bot/BasicBot/Pluggable/Module/Karma.pm b/lib/Bot/BasicBot/Pluggable/Module/Karma.pm index 8ce8421..cf17a90 100644 --- a/lib/Bot/BasicBot/Pluggable/Module/Karma.pm +++ b/lib/Bot/BasicBot/Pluggable/Module/Karma.pm @@ -50,7 +50,12 @@ sub told { } my $reply = $self->add_karma( $thing, $add, $comment, $mess->{who} ); if (lc $thing eq lc $self->bot->nick) { - $reply .= ' ' . ($add ? '(thanks!)' : '(pffft)'); + if ($reply eq '1') { + $reply = ''; + } else { + $reply .= ' '; + } + $reply .= ($add ? '(thanks!)' : '(pffft)'); } return $reply; }