matabot

a silly irc bot
git clone ssh://anon@git.pastanoggin.com
Log | Files | Refs | README | LICENSE

commit c5c28543561eda2d2c5cb8fdd17735338fcb7da3
parent b8d800b81cd3af0db4ec48a50e26531b81066e23
Author: noodle <noodle@pastanoggin.com>
Date:   Fri,  7 Nov 2025 08:59:36 +0000

set a default empty string value for "reply" variables

Diffstat:
Mmata_bot.pl | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mata_bot.pl b/mata_bot.pl @@ -46,7 +46,7 @@ sub randint { sub respond_command { my ($ball, $hellos, $sender_nick, $content) = @_; - my $reply; + my $reply = ''; if ($content =~ /\b{wb}([1-9]\d*)?d([1-9]\d*)\b{wb}/) { # we got dice my $ndice = $1 // 1; @@ -130,7 +130,7 @@ sub respond_command { sub respond_mention { my ($quotes, $sender_nick, $message) = @_; - my $reply; + my $reply = ''; if ($sender_nick eq $MOTHER) { $reply = "Yes, mother? ${MATA_HAPPY}"; } elsif ($message =~ /^\b${NICK_RE}\b$/) { @@ -144,7 +144,7 @@ sub respond_mention { # respond to channel sub respond { my ($lists, $subbuffer, $sender_nick, $message) = @_; - my $reply; + my $reply = ''; if ($subbuffer->{$sender_nick} && $message =~ m,\b{wb}s/([^/]+)/([^/]*)(?:/([gi]*))?,) { # chat s/// my $prev_message = $subbuffer->{$sender_nick};