thanx very much.
I actually came up with the idea to look at some other xdcc script to extract the function, so I checked out the Polaris Mirc version as well as the 666serv xdcc server, ripping some code snippets, while adjusting them at the same time a little bit to my needs. looks like this:

Code:
  
alias remcursp {
var %cps = 0
var %send = 1
if ($send(0) <= 0) { 
; if no uploads:
; stopping speedcheck timer
; erasing session upload record, halting script
timer1 off  | $xdcc_global_write(recordsession,0) | halt
}
else  {
var %cps = $calc(%cps + $send(%send).cps)
inc %send
}
}


Then the script checks whether the current upload speed is > than the RECORD upload speeds (session and overall) recorded in a text file. If it is, the script writes the new records to ini file, overwriting the old values:

Code:
if (%cps > $xdcc_global_read(recordsession)) 
{  
$xdcc_global_write(recordsession,%cps)
}
if (%cps > $xdcc_global_read(recordoverallbytes)) 
{
$xdcc_global_write(recordoverallbytes,%cps)
}


However, the entire idea of displaying the CURRENT bandwidth in connection with displaying the OVERALL RECORD upload speed as well as the SESSION RECORD upload speed, poses a certain problem: If you want to write the record speeds into a text file, you have to start a timer. Such a timer is set in my script to 20 sec., i.e., it checks every 20 sec. for the current upload speed and if it's higher than the record values in the file, the new records are written to file. Yet what happens if the xdcc server displays the ad in a channel PRIOR to noticing that the record speeds in the text file have been topped in the past 1-19 sec? Then the ad would look awkward, it would say

Quote:

** 2 packs ** 1 of 1 slots open, Min: 1kB/s, Record: 23.44KB/sec
** Bandwidth Usage ** Current: 26.44KB/sec, Record: 23.44KB/sec


see? because the 20 seconds are not over yet, the current speed would look higher than the record speeds. So I came up with the following idea:

Code:
 
if (%cps > $xdcc_global_read(recordsession))  { var %recordsession = %cps }
else { var %recordsession = $xdcc_global_read(recordsession) }
....
 


this way recordspeeds = currentspeed, if currentspeed > than record speeds as recorded in the text file at the moment when the xdcc ad appears in the channel. grin

The whole idea was about writing a xdcc script that can be loaded into the standard version of Mirc, while at the same time simulating IROffer behaviour, because IROffer is the standard out there so that many other scripts (XDCC Klipper for example) don't recognise other xdcc servers ads due to a varying syntax. So I re-wrote one of the existing xdcc scripts, which is now hardly distinguishable from IROffer (ad syntax, error syntax)