View Single Post
Old 12-18-2005, 07:00 PM  
helenoksen
Member
 
Join Date: Oct 2005
Posts: 75
Default 6 questions regarding psio

Division by zero bug

[R] 226-| + CRC-Check: SKIPPED! |
[R] 226-
[R] 226-Warning: Division by zero in C:\ioFTPD\scripts\php_psio\funcs.php on line 4

temp fix: http://www.inicom.net/forum/showthre...ion#post120307

Will there be a proper fix in v2?

Usertop/Grouptop bot announcement

Will this be implemented in v2?

Newleader & Halfway

http://www.inicom.net/forum/showthre...der#post113467

Can you add these variables for newleader and halfway in the next version? That would be awesome.

( 58.2MB/4F/675KB/s/51.6% )

Postdel

It takes about 1 min 30 secs to delete about 40-45 files, 15mb each, is this normal? With other zipscripts (ie iobanana) it doesnt even take half that long.

Bold variables

I would like to changes this:
Just.Testing-BLAH/CD1 [ 14.31mB in 1F at 4119kB/s in 5s ] was completed by

to this:

Just.Testing-BLAH/CD1 [ 14.31mB in 1F at 4119kB/s in 5s ] was completed by

How would I accomplish that without breaking anything?

I tried changing this line:
$locations_rlsname = $rlsname."/".parse($filepath,"\\",parsecount($filepath,"\ \")-1);

to this:

$locations_rlsname = "".$rlsname."/".parse($filepath,"\\",parsecount($filepath,"\ \")-1);

it works, the bot announces everything correctly but you'll end up with two extra chars in the .message file;

[2] (15:02:59) CWD CD1
[2] (15:03:00) 250- R E L E A S E I N F O
[2] (15:03:00) 250-+--------------------------------------------------------------------+
[2] (15:03:00) 250-Release Name: <char>Just.Testing-BLAH/<char>CD1

Release Completed in

I would like to be able to change the announcement from this:

Just.Testing-BLAH/CD1 [ 14.31mB in 1F at 4483kB/s in 5s ] was completed by (both 5 and s are bold)

to this:

Just.Testing-BLAH/CD1 [ 14.31mB in 1F at 4483kB/s in 5s ] was completed by (only the 5 is bold here, not the s)

These are the lines that i changed in order to get the bot to announce the elapsed time correctly.

HTML Code:
function calcElapsedTime($time)
{
       // calculate elapsed time (in seconds!)
       $diff = time()-$time;
       $daysDiff = floor($diff/60/60/24);
       $diff -= $daysDiff*60*60*24;
       $hrsDiff = floor($diff/60/60);
       $diff -= $hrsDiff*60*60;
       $minsDiff = floor($diff/60);
       $diff -= $minsDiff*60;
       $secsDiff = $diff;
	   if ($daysDiff > 0) {
	       $output .= $daysDiff.'d ';
	   }
	   if ($hrsDiff > 0) {
		   $output .= $hrsDiff.'h ';   
	   } elseif ($output != '') {
	   		$output .= '0h';
	   }
	   if ($minsDiff > 0) {
		   $output .= $minsDiff.'m ';   
	   } elseif ($output != '') {
	   		$output .= '0m';
	   }
	   if ($secsDiff > 0) {
		   $output .= $secsDiff.'s';   
	   } elseif ($output != '') {
	   		$output .= '0s';
	   } elseif ($output == '') {
		   	$output .= '0s';
	   }
       return $output;
}


function calcElapsedTime($time)
{
       // calculate elapsed time (in seconds!)
       $diff = time()-$time;
       $daysDiff = floor($diff/60/60/24);
       $diff -= $daysDiff*60*60*24;
       $hrsDiff = floor($diff/60/60);
       $diff -= $hrsDiff*60*60;
       $minsDiff = floor($diff/60);
       $diff -= $minsDiff*60;
       $secsDiff = $diff;
	   if ($daysDiff > 0) {
	       $output .= '\\002'.$daysDiff.'\\002d ';
	   }
	   if ($hrsDiff > 0) {
		   $output .= '\\002'.$hrsDiff.'\\002h ';   
	   } elseif ($output != '') {
	   		$output .= '0h';
	   }
	   if ($minsDiff > 0) {
		   $output .= '\\002'.$minsDiff.'\\002m ';   
	   } elseif ($output != '') {
	   		$output .= '0m';
	   }
	   if ($secsDiff > 0) {
		   $output .= '\\002'.$secsDiff.'\\002s';   
	   } elseif ($output != '') {
	   		$output .= '0s';
	   } elseif ($output == '') {
		   	$output .= '0s';
	   }
       return $output;
}
as you can see it's a very ugly 'fix' and it will leave a complete mess by adding the bold codes to the 'Release Completed in' line below:

[2] (15:02:59) CWD CD1
[2] (15:03:00) 250- R E L E A S E I N F O
[2] (15:03:00) 250-+--------------------------------------------------------------------+
[2] (15:03:00) 250-Release Name: Just.Testing-BLAH/CD1
[2] (15:03:00) 250-Fastest Upload by test/iND at 1410.16KBs
[2] (15:03:00) 250-Slowest Upload by test/iND at 239.93KBs
[2] (15:03:00) 250-Release Completed in \00222\002m \00229\002s
[2] (15:03:00) 250-+--------------------------------------------------------------------+

io 5.8.5r
psio 0.1.4
helenoksen is offline   Reply With Quote