mata_bot

some cheeky bot for #unix_surrealism
git clone https://git.pastanoggin.com/mata_bot.git
Log | Files | Refs | README | LICENSE

commit 60074d3c8558d25b17d21bd4d51a0117fea60c16
parent 637be52e7d7e73817d5daae8213db28e08a1263d
Author: boredpasta <boredpasta@tutanota.com>
Date:   Mon, 17 Mar 2025 12:49:45 +0200

delete errors on failed s/// cause chat thinks it's stupid xD

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

diff --git a/mata_bot.pl b/mata_bot.pl @@ -38,6 +38,7 @@ sub msg { } # respond to channel +# returns 1 if bot shouldn't remember last message for s///, 0 otherwise sub respond { my ($sock, $sender_nick, $message) = @_; # if no triggers found, check for mentions @@ -61,10 +62,8 @@ sub respond { my $replacement = $2; if ($subbuffer{$sender_nick} =~ s/$toreplace/$replacement/) { msg($sock, "${sender_nick} meant to say: $subbuffer{$sender_nick}"); - } else { - msg($sock, "${sender_nick} meant to say something but idk lol <[>~<]> (``$toreplace'' doesn't exist in their last message)"); + return 1; } - return 1; } elsif ($message =~ m,watch\?v=([a-zA-Z0-9_-]+),) { # post youtube video titles from video ID my $video_id = $1;