diff options
| -rw-r--r-- | _data/scripts.yaml | 5 | ||||
| -rw-r--r-- | _testing/config.yml | 1 | ||||
| -rw-r--r-- | scripts/randaway.pl | 12 |
3 files changed, 9 insertions, 9 deletions
diff --git a/_data/scripts.yaml b/_data/scripts.yaml index 0305fa9..2c489c5 100644 --- a/_data/scripts.yaml +++ b/_data/scripts.yaml @@ -3924,14 +3924,15 @@ version: '1.6' - authors: 'Lasse Karstensen' + commands: 'awayadd awayreasons awayreread raway' contact: lkarsten@stud.ntnu.no description: 'Random away-messages' filename: randaway.pl license: 'Public Domain' - modified: '2014-10-19 11:54:16' + modified: '2017-03-15 20:28:47' name: randaway.pl url: http://www.stud.ntnu.no/~lkarsten/irssi/ - version: '1.13' + version: '1.14' - authors: legion commands: randname diff --git a/_testing/config.yml b/_testing/config.yml index e26aefc..742e127 100644 --- a/_testing/config.yml +++ b/_testing/config.yml @@ -64,7 +64,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\""); } } |
