summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--_testing/config.yml1
-rw-r--r--scripts/mangle.pl26
2 files changed, 15 insertions, 12 deletions
diff --git a/_testing/config.yml b/_testing/config.yml
index 159f6d0..439775d 100644
--- a/_testing/config.yml
+++ b/_testing/config.yml
@@ -49,7 +49,6 @@ whitelist:
- l33tmusic
- localize
- log2ansi
- - mangle
- mkshorterlink
- newsline
- nicklist
diff --git a/scripts/mangle.pl b/scripts/mangle.pl
index 00158a5..acfbcd6 100644
--- a/scripts/mangle.pl
+++ b/scripts/mangle.pl
@@ -7,18 +7,20 @@
use strict;
use locale;
use Irssi 20020324;
+use Irssi::TextUI;
use POSIX;
use Data::Dumper;
use vars qw($VERSION %IRSSI %HELP %channels %translations);
-$VERSION = '2004031701';
+$VERSION = '2017031701';
%IRSSI = (
authors => 'Szymon Sokol',
contact => 'szymon@hell.pl',
name => 'mangle',
description => 'translates your messages into Morse code, rot13 and other sillinesses.',
license => 'GPLv2',
- url => 'http://irssi.org/scripts/', changed => $VERSION,
+ url => 'http://irssi.org/scripts/',
+ changed => $VERSION,
modules => 'Data::Dumper'
);
@@ -192,23 +194,25 @@ sub add_channel ($$) {
sub save_channels {
my $filename = Irssi::settings_get_str('mangle_filename');
- local *F;
- open F, '>'.$filename;
+ my $fo;
+ open $fo, '>',$filename;
my $data = Dumper(\%channels);
- print F $data;
- close F;
+ print $fo $data;
+ close $fo;
print CLIENTCRAP "%R>>%n Mangle channels saved";
}
sub load_channels {
my $filename = Irssi::settings_get_str('mangle_filename');
return unless (-e $filename);
- local *F;
- open F, '<'.$filename;
+ my $fi;
+ open $fi, '<',$filename;
my $text;
- $text .= $_ foreach <F>;
- no strict "vars";
- %channels = %{ eval "$text" };
+ $text .= $_ foreach <$fi>;
+ #no strict "vars";
+ my $VAR1;
+ eval "$text";
+ %channels = %$VAR1;
}
sub mangle_show ($$) {