mIRC Homepage
Posted By: nataliad isprotect - 13/12/06 02:02 PM
hello!

how do I make this script:

on *:text:hello:?: msg $nick hi

to work for nicks that are not in my protect list?

thanks!
Posted By: RoCk Re: isprotect - 13/12/06 02:47 PM
Prefixing an operator with an exclamation mark negates the operator...

Code:
on *:TEXT:hello:?: {
  if ($nick !isprotect) msg $nick hi
}


If you have a specific channel in mind...

Code:
on *:TEXT:hello:?: {
  if ($nick !isprotect #chan) msg $nick hi
}


#chan = your channel name
Posted By: nataliad Re: isprotect - 13/12/06 02:52 PM
thanks

the brackets () in the "$nick isprotect" are necessary?
Posted By: RoCk Re: isprotect - 13/12/06 02:57 PM
I think without v2 in the IF statement you would need the
brackets, otherwise I would think it may make the command v2.
In other words, without the brackets it may turn out like...

if ($nick !isprotect msg) $nick hi

I could be wrong. I just always use the brackets.
Posted By: Riamus2 Re: isprotect - 13/12/06 09:26 PM
I think v2 is the same regardless.

However, parentheses are a REALLY good idea and are a good coding style. Just because you don't need something doesn't mean it's a good idea to not use it.
© mIRC Discussion Forums