mIRC Homepage
Hi,

I have a query-blocker script and would like to load it automatically it whenever I change my nick to NickAway.
I tried to use

on 1:NICK:{
if ($nick == NickAway) load -rs no-query.mrc
}

This does not work.
I would also like to unload the script automatically when I change the nick back to Nick.
I am running MIrc 6.03 with Invision 2.0 build 2520

I got the impression that on nick doesn't work at all whatever I try ..

Your help is appreciated.
Gwion
On Nick changes when someone else changes THEIR nick..

Instead, you could do something like this:
alias nick {
if ($1 == NickAway) load -rs no-query.mrc
nick $1
}
That would load no matter the name...

You may try

alias away {
if ($away) {
/unload -rs no-query.mrc
/away
}
else {
/load -ra no-query.mrc
/away $1-
}
}

You also could use groups..

#noquery off
on 1:OPEN:?:*: {
/inc -u300 %away. [ $+ [ $address ] ]
/msg $nick Sorry, but I am currently away. (Auto-Responce)
/halt
}
#noquery end

then when you do away, type /enable #noquery, and likewise /disable #noquery
Another idea, you could perhaps use #groups to turn that section on or off, then you won't have to load and unload it all the time.
One step ahead of you, elroyK grin
Hi,

ah .. silly me.

Ok, i tried to use the on nick event for something else. If a guest joins the channel he should only get voice when he changes the nick to something else than guest*

So, I tried:
on 1:nick:# {
if (guest !isin $nick) mode $chan +v $nick
}


I interpret this as
when guest changes nick to a nick that does not include guest give voice

But this doesn't work.
Where is the mistake?

Thx,
Gwion

I think what you want here is something like so:

on 1:NICK:{
if ($nick == $me) && (Away isin $me) { load -rs1 no-query.mrc }
}

note that it checks to see that you are the person that is changing their nick and not just anyone and also note the load switch being -rs1 rather then just -rs. This is crucial with Invision when you intend to halt things such as querys etc. smile
© mIRC Discussion Forums