mIRC Homepage
Posted By: LostServ If.. - 26/06/04 09:13 AM
I've tried $read and $file but cant get it to work..
How do I make a if statement where lets say:
if $nick isin blah.txt { msg # $nick is in blah.txt!! }
Posted By: FiberOPtics Re: If.. - 26/06/04 09:38 AM
Hi,

supposing that your blah.txt file exists of lines with on each line 1 nickname, then you can use:

if $read(blah.txt,w,$nick) { msg # $nick is in blah.txt!! }


Greets
Posted By: LostServ Re: If.. - 26/06/04 10:02 AM
That worked, but how do i get it to do somthing like this:

Code:
on *:TEXT:!test:#: {
  if $read(test.txt,w,$nick) { msg # $nick is in test.txt!! }
  elseif { msg # Sorry You are not in the list, $nick }
}
Posted By: FiberOPtics Re: If.. - 26/06/04 10:06 AM
Hi,
Code:
  
on *:TEXT:!test:#: {  
  if $read(test.txt,w,$nick) { msg # $nick is in test.txt!! }
  else { msg # Sorry You are not in the list, $nick }
}


Greets
Posted By: LostServ Re: If.. - 26/06/04 10:08 AM
Thanks, i was to characters off :tongue: so close..
Posted By: FiberOPtics Re: If.. - 26/06/04 12:50 PM
Hehe,

yeah you were close. By the way, if you wouldn't know it yet, the mIRC help file is really good. You'll find a lot of documentation on commands, identifier, events, etc.

/help if then else

Bye!
© mIRC Discussion Forums