X-Git-Url: https://code.th-h.de/?p=usenet%2Fusevote.git;a=blobdiff_plain;f=uvvote.pl;h=8e8fb68b608af026802046e34eea285ff7aca6b7;hp=5cff3759686807a8c6a8230979ea7408c7e734b8;hb=dc651b428363dfeea82fd030905711b8d96ea9b4;hpb=34809a2a81332b011af9f6055a8e3b846053d491 diff --git a/uvvote.pl b/uvvote.pl index 5cff375..8e8fb68 100755 --- a/uvvote.pl +++ b/uvvote.pl @@ -122,9 +122,9 @@ if ($clean) { # normally unixtime is sufficient, if it is not unique append our PID my $ext = time; - opendir (DIR, $config{tmpdir}); - my @tmpfiles = readdir (DIR); - closedir (DIR); + opendir (TMP, $config{tmpdir}); + my @tmpfiles = readdir (TMP); + closedir (TMP); opendir (FERTIG, $config{archivedir}); my @fertigfiles = readdir (FERTIG); closedir (FERTIG); @@ -273,7 +273,7 @@ sub process_vote { # this matches on a single appearance: if ($$body =~ /#$votenum\W*?\[(.+)\]/) { # one or more vote strings were found - $onevote = 1; + $onevote ||= 1; # set $onevote to 1 if it was 0 my $votestring = $1; if ($votestring =~ /^\W*$config{ja_stimme}\W*$/i) { $vote = "J";