mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 204
K
keeker Offline OP
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Dec 2002
Posts: 204
i am trying to use $read to read scan a text file to see if a $nick is already in the txt. but i think i am screwing it up. the way it is supposed to work is when a person joins any of the three channels i have set, it scans a text file for the nick, and if NOT found, it does a ctcp version on them and captures the version information along with thier nick, but i cant get the scanning to work. Here is my code so far:
Code:
on *:join:#speaker's_corner,#mp3wavlovers,#keeker:{
  if ( $nick !isin $read(userversion.txt,s,$nick)) { ctcp $nick version }
}
on *:CTCPREPLY:version*:{
  echo -a $1- 
  if ( $1 !isin $read(c:\mirc2\userversion.txt,w,* $+ $nick $+ *) ) { write c:\mirc2\userversion.txt $nick $3- }
}


can someone please give me a shove in the right direction? grin

edit - Fixed ending code tag

Last edited by keeker; 26/02/03 06:47 AM.
Joined: Dec 2002
Posts: 698
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 698
Code:
on *:join:#speaker's_corner,#mp3wavlovers,#keeker:{
  if !$read(userversion.txt,s,$nick) { ctcp $nick version }
}
on *:CTCPREPLY:version*:{
  echo -a $1-
  if !$read(userversion.txt,s,$nick) { write userversion.txt $nick $2- }
}
Plus you need to fix your [[/b]/code] tag up smile

K
krunch
krunch
K
try
$read(userversion.txt, s, * $+ $nick $+ *)

C
Coca_Bear
Coca_Bear
C
use either

$read(userversion.txt, w, $+(*,$nick,*))

or

$read(userversion.txt, w, $nick)

Coca-Bear


Joined: Dec 2002
Posts: 204
K
keeker Offline OP
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Dec 2002
Posts: 204
thanks nimue, your suggestion worked smile


Link Copied to Clipboard