mIRC Home    About    Download    Register    News    Help

Print Thread
#166644 13/12/06 02:02 PM
Joined: Feb 2006
Posts: 307
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Feb 2006
Posts: 307
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!

nataliad #166652 13/12/06 02:47 PM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
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

Last edited by RoCk; 13/12/06 02:54 PM.
RoCk #166654 13/12/06 02:52 PM
Joined: Feb 2006
Posts: 307
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Feb 2006
Posts: 307
thanks

the brackets () in the "$nick isprotect" are necessary?

nataliad #166655 13/12/06 02:57 PM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
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.

RoCk #166676 13/12/06 09:26 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard