got a little problem,

Code:
 
alias ttlist {
  echo -a starting top ten scores
  window @sort
  loadbuf -twins @sort c:\mirc\download\month.tsc
  filter -wwcute 2 61 @sort @sort
  var %line = $line(@sort,0)
  while %line > 0 {
    tokenize 61 $line(@sort,%line)
    rline @sort %line $1 $2
    dec %line
  }
  var %tt = 1
  write -c top_ten.txt
  write -l1 top_ten.txt <div align=center><h1> Here are the Top ten Trivia Scores for $asctime(mmmm yyyy) $+ </h1>
  write -l2 top_ten.txt <table border="2" frame="box" rules="all" cellspacing="2" cellpadding="2" align="center" $&
bgcolor="black" bordercolor="lime" bordercolorlight="lime" bordercolordark="green" style="color :#4EFA86; ">
  write -l3 top_ten.txt <tr><td>Rank</td><td>Nick</td><td>Score</td></tr>
  while %tt <= 10 {
    tokenize 32 $line(@sort,%tt)
    write top_ten.txt <tr><td> $+ %tt $+ </td><td> $+ $1 $+ </td> <td> $+ $2 $+ </td></tr> 
    inc %tt
  }
  window -c @sort
  write -i13 top_ten.txt </table>
  run -n ttupload.bat
  echo -a finished  with top ten scores
}
alias get_monthtsc {
  echo -a Initiating chat with triviabot
  dcc chat Triviab0t

}
menu channel {
  -
  Top ten Trivia Scores:get_monthtsc
  -
}
on *:CHAT:Username*:/msg =$nick botusername
on *:CHAT:Password*:{
  .timer 1 1 msg =$nick sum133tpazwrd 
  .dcc ignore off
  .timer 1 3 msg =$nick 'sendmth
  .timer 1 13 .dcc ignore on
}
on 1:FILERCVD:month.tsc:{
  if ( $nick == Triviab0t ) && ( $network == Phazenet ) {
    close -c Triviab0t
    echo -a Finished Receiving the file $filename from $nick now making the top ten list
    ttlist 
  }
} 
note: formatted slightly to fit forum

this is my code that is supposed to connect to a triviabot, enter its username, and passoword, send the mesage " 'sendmth " receive the file and when the file is received then close the dcc chat window and run ttlist to make the text file that will be included in a .shtml document.

i can connect to the bot
i can send user name and pasowrd along with the message
the file downloads
but when it comes time for the on filerecvd to fire, it dont. the window stays open, and it doesnt run ttlist, so the top ten stats aint made. can yall see any problem areas in this code?

by the way, i have dcc set to auto with the bots name in the auto accept list if that helps.


keek: Scots - intr.v. keeked, keekĀ·ing, keeks
To peek; peep.