mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 18
G
Gwion Offline OP
Pikka bird
OP Offline
Pikka bird
G
Joined: Dec 2002
Posts: 18
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

Joined: Jun 2003
Posts: 114
T
Vogon poet
Offline
Vogon poet
T
Joined: Jun 2003
Posts: 114
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
}


-------------
I am the self-appointed God of needlessly complex mIRCscript.
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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


-KingTomato
Joined: Jun 2003
Posts: 36
E
Ameglian cow
Offline
Ameglian cow
E
Joined: Jun 2003
Posts: 36
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.

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
One step ahead of you, elroyK grin


-KingTomato
Joined: Dec 2002
Posts: 18
G
Gwion Offline OP
Pikka bird
OP Offline
Pikka bird
G
Joined: Dec 2002
Posts: 18
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


Joined: Feb 2003
Posts: 2
C
Bowl of petunias
Offline
Bowl of petunias
C
Joined: Feb 2003
Posts: 2
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


cRYOa

Link Copied to Clipboard