Mercurial > pidgin
changeset 6125:e8204ffce9f8
[gaim-migrate @ 6599]
Make fortuneprofile.pl not infinite loop when you don't have fortune installed.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 15 Jul 2003 01:01:38 +0000 |
parents | 16fd7811effd |
children | 6c0efe183edb |
files | plugins/fortuneprofile.pl |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/fortuneprofile.pl Mon Jul 14 23:05:21 2003 +0000 +++ b/plugins/fortuneprofile.pl Tue Jul 15 01:01:38 2003 +0000 @@ -38,7 +38,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -$handle = GAIM::register("Fortune Profile", "3.2", "", ""); +$handle = GAIM::register("Fortune Profile", "3.3", "", ""); $tab = " "; $tab = $tab . $tab . $tab . $tab; @@ -69,6 +69,9 @@ do { do { #It's a while loop because it doesn't always work for some reason $fortune = `$command`; + if ($? == -1) { + return; + } } while ($fortune eq ""); $fortune =~ s/\n/$nl/g; $fortune =~ s/\t/$tab/g; @@ -88,8 +91,8 @@ sub description { my($a, $b, $c, $d, $e, $f) = @_; - ("Fortune Profile", "3.2", "Sets your AIM profile to a fortune (with a header and footer of your choice).", - "Sean Egan <bj91704\@binghamton.edu>", "http://gaim.sf.net/", + ("Fortune Profile", "3.3", "Sets your AIM profile to a fortune (with a header and footer of your choice).", + "Sean Egan <bj91704\@binghamton.edu>", "http://gaim.sf.net/", "/dev/null"); }