diff options
| author | bw1 | 2017-03-15 20:28:47 +0100 |
|---|---|---|
| committer | bw1 | 2017-03-15 20:28:47 +0100 |
| commit | cdcb710badf883660a56f6f3033fe1ece1e53a71 (patch) | |
| tree | f22edc96b55865f3b2d90a5832e454deebad4b89 | |
| parent | 575da99778c903e6efb43dd878e0d8c70eb827c2 (diff) | |
| download | scripts.irssi.org-cdcb710badf883660a56f6f3033fe1ece1e53a71.tar.bz2 | |
[randaway] a small correction
| -rw-r--r-- | _testing/config.yml | 1 | ||||
| -rw-r--r-- | scripts/randaway.pl | 12 |
2 files changed, 6 insertions, 7 deletions
diff --git a/_testing/config.yml b/_testing/config.yml index b6a8f12..4ebe499 100644 --- a/_testing/config.yml +++ b/_testing/config.yml @@ -65,7 +65,6 @@ whitelist: - quizmaster-fr - quizmaster - quiz - - randaway - scroller - stocks - sysinfoplus diff --git a/scripts/randaway.pl b/scripts/randaway.pl index 6f63c00..91c8d38 100644 --- a/scripts/randaway.pl +++ b/scripts/randaway.pl @@ -19,7 +19,7 @@ use Irssi 20011116; use Irssi::Irc; use vars qw($VERSION %IRSSI); -$VERSION = '1.13'; +$VERSION = '1.14'; %IRSSI = ( authors => "Lasse Karstensen", contact => "lkarsten\@stud.ntnu.no", @@ -32,7 +32,7 @@ $VERSION = '1.13'; # file to read random reasons from. It should contain one # reason at each line, empty lines and lines starting with # is # skipped. -$reasonfile = Irssi::get_irssi_dir() . "/awayreasons"; +my $reasonfile = Irssi::get_irssi_dir() . "/awayreasons"; my @awayreasons; @@ -46,7 +46,7 @@ sub readreasons { # like a read() .. ie, stopping at each \n. local $/ = "\n"; while (<F>) { - $reason = $_; + my $reason = $_; # remove any naughty linefeeds. chomp($reason); @@ -94,8 +94,8 @@ sub add_reason { # adding to current environment. push(@awayreasons, $reason); # and also saving it for later. - open(F, ">>", $reasonsfile); - print F $reason; + open(F, ">>", $reasonfile); + print F $reason,"\n"; close F; Irssi::print("Added: $reason"); } @@ -103,7 +103,7 @@ sub add_reason { sub reasons { Irssi::print("Listing current awayreasons"); - foreach $var (@awayreasons) { + foreach my $var (@awayreasons) { Irssi::print("=> \"$var\""); } } |
