From 0d4de36c6e62b574c383cf6e43781aa1c531e2f2 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 19 Oct 2001 17:28:34 +0000 Subject: Randomizes the quit msg only if it wasn't given. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1853 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- scripts/quitmsg.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/quitmsg.pl b/scripts/quitmsg.pl index 17bf9444..1a946a19 100644 --- a/scripts/quitmsg.pl +++ b/scripts/quitmsg.pl @@ -1,4 +1,5 @@ -# Quit with a random quit message read from ~/.irssi/irssi.quit +# If quit message isn't given, quit with a random message +# read from ~/.irssi/irssi.quit use Irssi; use Irssi::Irc; @@ -8,6 +9,7 @@ my $quitfile = glob "~/.irssi/irssi.quit"; sub cmd_quit { my ($data, $server, $channel) = @_; + return if ($data eq ""); open (f, $quitfile) || return; my $lines = 0; while() { $lines++; }; -- cgit v1.2.3