Grey2002
Нет... не помогает....
Вся бага тут сидит....
Код: sub whosonline {
local($instruct) = @_;
($tempusername, $where, $method) = split(/\|/, $instruct);
$guests = 0;
$members = 0;
$currenttime = time;
$membergone = 30;
$userexpire = $currenttime - ($membergone * 60);
$ipaddress = $ENV{'REMOTE_ADDR'};
$logname = $tempusername;
&getmember("$inmembername");
$tempusername = "$ibtxt{'0043'} $ipaddress" if ($tempusername eq "$ibtxt{'0043'}");
$filetoopen = "$ikondir" . "data/onlinedata.dat";
$filetoopen = &stripMETA($filetoopen);
open(FILE,"$filetoopen");
@onlinedata = <FILE>;
close(FILE);
open(FILE,">$filetoopen");
flock(FILE, 2);
$memberprinted = "no";
foreach $line (@onlinedata) {
chomp $line;
($savedusername, $savedtime, $savedwhere) = split(/\|/, $line);
$savedusername =~ s/\_/ /g;
$tempusername =~ s/\_/ /g;
$savedusername = &unHTML($savedusername);
$tempusername = &unHTML($tempusername);
unless ("$userexpire" > "$savedtime") {
if ("$savedusername" ne "$tempusername") { print FILE "$line\n"; }
elsif ("$savedusername" eq "$tempusername") { print FILE $savedusername."|$currenttime|$where\n"; $memberprinted = "yes";}
}
} # end foreach
if ($memberprinted eq "no") { print FILE "$tempusername|$currenttime|$where\n";}
close(FILE);
Нет... не помогает....
Вся бага тут сидит....
Код: sub whosonline {
local($instruct) = @_;
($tempusername, $where, $method) = split(/\|/, $instruct);
$guests = 0;
$members = 0;
$currenttime = time;
$membergone = 30;
$userexpire = $currenttime - ($membergone * 60);
$ipaddress = $ENV{'REMOTE_ADDR'};
$logname = $tempusername;
&getmember("$inmembername");
$tempusername = "$ibtxt{'0043'} $ipaddress" if ($tempusername eq "$ibtxt{'0043'}");
$filetoopen = "$ikondir" . "data/onlinedata.dat";
$filetoopen = &stripMETA($filetoopen);
open(FILE,"$filetoopen");
@onlinedata = <FILE>;
close(FILE);
open(FILE,">$filetoopen");
flock(FILE, 2);
$memberprinted = "no";
foreach $line (@onlinedata) {
chomp $line;
($savedusername, $savedtime, $savedwhere) = split(/\|/, $line);
$savedusername =~ s/\_/ /g;
$tempusername =~ s/\_/ /g;
$savedusername = &unHTML($savedusername);
$tempusername = &unHTML($tempusername);
unless ("$userexpire" > "$savedtime") {
if ("$savedusername" ne "$tempusername") { print FILE "$line\n"; }
elsif ("$savedusername" eq "$tempusername") { print FILE $savedusername."|$currenttime|$where\n"; $memberprinted = "yes";}
}
} # end foreach
if ($memberprinted eq "no") { print FILE "$tempusername|$currenttime|$where\n";}
close(FILE);