mIRC Home    About    Download    Register    News    Help

Print Thread
#21364 28/04/03 03:45 PM
Joined: Dec 2002
Posts: 204
K
keeker Offline OP
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Dec 2002
Posts: 204
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.
#21365 28/04/03 04:13 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
does $network work in DCC events?


Code:
//if ( khaled isgod ) echo yes | else echo no
#21366 28/04/03 04:16 PM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
sure .. as long as the network provides it or it's in server list .. otherwise $network will return $null

#21367 28/04/03 05:50 PM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Is Triviab0t in your userlist, with a named level perhaps?
The other events there use on *:
on 1 events won't trigger for users with only named levels.

#21368 28/04/03 06:12 PM
Joined: Dec 2002
Posts: 204
K
keeker Offline OP
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Dec 2002
Posts: 204
DOH!!!!!!! Thanks Nimue, yeah trivb0t was in my auto dcc list with "auto:triviab0t"

i changed the event to on auto:FILEREVCD:


thanks


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

Link Copied to Clipboard