mIRC Home    About    Download    Register    News    Help

Print Thread
If.. #88245 26/06/04 09:13 AM
Joined: Mar 2004
Posts: 359
L
LostServ Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Mar 2004
Posts: 359
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!! }

Re: If.. #88246 26/06/04 09:38 AM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
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


Gone.
Re: If.. #88247 26/06/04 10:02 AM
Joined: Mar 2004
Posts: 359
L
LostServ Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Mar 2004
Posts: 359
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 }
}

Re: If.. #88248 26/06/04 10:06 AM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
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


Gone.
Re: If.. #88249 26/06/04 10:08 AM
Joined: Mar 2004
Posts: 359
L
LostServ Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Mar 2004
Posts: 359
Thanks, i was to characters off :tongue: so close..

Re: If.. #88250 26/06/04 12:50 PM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
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!


Gone.