]> jfr.im git - irc/weechat/scripts.git/commitdiff
query_blocker 1.5: fix regression introduced in version 1.4
authorcrazycatdevs <redacted>
Tue, 22 Feb 2022 07:35:15 +0000 (08:35 +0100)
committerSébastien Helleu <redacted>
Tue, 22 Feb 2022 07:37:53 +0000 (08:37 +0100)
$arg was missing, creating "Use of uninitialized value." issue

perl/query_blocker.pl

index 1d33e7fdb9d83314ba3e32c18f28b04da30668bd..aa073c63bb88f6c6060156fd6be14941a761fafd 100644 (file)
 #
 # -----------------------------------------------------------------------------
 # History:
+# 2022-02-21: CrazyCat <crazycat@c-p-f.org>
+#     version 1.5:
+#     FIX: regression from https://github.com/weechat/scripts/issues/493
+#
 # 2022-02-18: nils_2@libera.#weechat:
 #     version 1.4:
 #     FIX: https://github.com/weechat/scripts/issues/493
@@ -45,6 +49,7 @@
 # 2021-05-05: Sébastien Helleu <flashcode@flashtux.org>:
 #     version 1.3:
 #     FIX: add compatibility with XDG directories (WeeChat >= 3.2)
+#
 # 2018-07-30, usefulz & nils_2:
 #     version 1.2:
 #     FIX: undefine subroutine
@@ -120,7 +125,7 @@ use strict;
 
 my $SCRIPT      = 'query_blocker';
 my $AUTHOR      = 'rettub <rettub@gmx.net>';
-my $VERSION     = '1.4';
+my $VERSION     = '1.5';
 my $LICENSE     = 'GPL3';
 my $DESCRIPTION = 'Simple blocker for private message (i.e. spam)';
 my $COMMAND     = "query_blocker";             # new command name
@@ -407,7 +412,7 @@ sub modifier_irc_in_privmsg {
         my $my_nick_msg = $2;
         my $query_msg  = $3;
 
-        return if ($my_nick ne $my_nick_msg);
+        return $arg if ($my_nick ne $my_nick_msg);
 
         # always allow own queries
         return $arg if ($query_nick eq $my_nick);