i coded my own packetnews.com "bot" so to say...
i'm having problems removing old (over 48hrs) items "packs"
it seems to work, but then it leaves sum items that are 6days to 3 weeks old in the database... please help... confused
Code:
 
alias update_packs {
  set %bak.hash_t $hget(0)
  set %bak.count_hash 1
  set %bak.tot_rem 0
  set %bak.up_ctime $ctime
  one---
  :end
}
alias one--- { 
  set %bak.find_many 0
  set %bak.start- 1
  set %bak.tot_many %bak.hash_t
  set %bak.total_packs 0
  while (%bak.start- <= %bak.tot_many) {
    if ( $readini(nojoin.ini, nojoin, $gettok( $hget(%bak.start-) ,2,46) ) = no) { inc %bak.find_many }
    inc %bak.start-
  }
  var %bak.time_finish = $duration( $round($calc( %bak.hash_t * 3 ),0) )
  msg %chan_s 8Beginning Updateing Pack Database And will take approx9 %bak.time_finish 8To Update......
  two---
}
alias two--- {
  if (%bak.count_hash <= %bak.hash_t) {
    if ( $readini(nojoin.ini, nojoin, $gettok( $hget(%bak.count_hash) ,2,46) ) = no) { goto hereinc }
    if ( $gettok( $hget(%bak.count_hash) ,1,46) = packs) {
      set %bak.items.p $hfind( $hget(%bak.count_hash) , * , 0 , w )
      set %bak.this_pack 1
      set %bak.removed 0
      set %bak.this_ctime $ctime
      .msg %chan_s 8Now updating Pack Database For9 $gettok( $hget(%bak.count_hash) ,2,46)
      while (%bak.this_pack <= %bak.items.p) {
        if ( $calc( $ctime - $gettok( $hget( $hget(%bak.count_hash) , %bak.this_pack ).data , 4 , 32) ) > 172800) && ( $hget( $hget(%bak.count_hash) , %bak.this_pack ).item != $null ) {
          hdel $hget(%bak.count_hash) $hget( $hget(%bak.count_hash) , %bak.this_pack ).item
          inc %bak.removed
          inc %bak.tot_rem
        }
        inc %bak.total_packs
        inc %bak.this_pack
      }
      .msg %chan_s 8Finished Updating Pack Database For9 $gettok( $hget(%bak.count_hash) ,2,46) 8Removed a total of9 %bak.removed 8Packs Out Of9 %bak.items.p 8That were 48hrs old and took9 $duration($calc( $ctime - %bak.this_ctime )) 8To Update.
      :hereinc
      inc %bak.count_hash
    }
  }
  if (%bak.count_hash > %bak.hash_t) { 
    .msg %chan_s 8Finished updating pack Database... removed a total of9 %bak.tot_rem 8Packs Out Of9 %bak.total_packs 8From the database and took9 $duration($calc( $ctime - %bak.up_ctime )) 8To Update. Next Update Will Begin At Approx.9 $time( $calc( $ctime + 18000 ) ,hh:nn tt) -pst 
    .timerupdate $time( $calc( $ctime + 18000 ) ,hh:nn.tt) 1 1 update_packs
    unset %bak.*
    sv_hash
    halt
  }
  :end
  .timertwo--- 1 2 two---
}
alias sv_hash {
  var %i = 1
  while ($hget(%i)) {
    hsave -o $hget(%i) $mircdirPack_Search\ $+ $replace($hget(%i),|,$chr(44)) $+ .txt
    echo -a Saved $replace($hget(%i),|,$chr(44)) Pack Database
    inc %i
  }
}
 


Thanxz in advance for any help givin. laugh