Skip to content

Commit 30f77e9

Browse files
weechatterflashcode
authored andcommitted
unset_unused.pl 0.5: fix scripts currently unloaded
1 parent bf5252b commit 30f77e9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

perl/unset_unused.pl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011-2018 by Nils Görs <[email protected]>
2+
# Copyright (c) 2011-2019 by Nils Görs <[email protected]>
33
#
44
# unset script option(s) from not installed scripts
55
#
@@ -17,6 +17,7 @@
1717
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1818
#
1919
#
20+
# 22-07-19: 0.5: fixed: scripts currently unloaded wasn't recognised (reported by squigz)
2021
# 18-04-18: 0.4: add support for php and javascript
2122
# 14-10-04: 0.3: fixed: problem with unset options (reported by GermainZ)
2223
# 13-07-27: 0.2: added: support for guile_script
@@ -28,12 +29,11 @@
2829
use strict;
2930

3031
my $PRGNAME = "unset_unused";
31-
my $VERSION = "0.4";
32+
my $VERSION = "0.5";
3233
my $AUTHOR = "Nils Görs <weechatter\@arcor.de>";
3334
my $LICENCE = "GPL3";
3435
my $DESCR = "unset script option(s) from not installed scripts (YOU ARE USING THIS SCRIPT AT YOUR OWN RISK!)";
3536
my $weechat_version = "";
36-
my @option_list;
3737
my %script_plugins = (
3838
"python" => "python_script",
3939
"perl" => "perl_script",
@@ -45,8 +45,6 @@
4545
"javascript" => "javascript_script",
4646
);
4747

48-
my $option_struct;
49-
my %option_struct;
5048
my $str;
5149

5250
# get installed scripts
@@ -71,6 +69,8 @@ sub get_options
7169
my $key;
7270
my $number = 0;
7371
chop($str);
72+
my $option_struct;
73+
my %option_struct;
7474

7575
foreach my $plugin (keys %script_plugins)
7676
{
@@ -119,6 +119,7 @@ sub my_command_cb{
119119
my ($getargs) = ($_[2]);
120120
return weechat::WEECHAT_RC_OK if ($getargs eq "");
121121

122+
$str = ""; # reset
122123
get_scripts();
123124

124125
if ( $getargs eq "list")

0 commit comments

Comments
 (0)