mIRC Home    About    Download    Register    News    Help

Print Thread
#214124 20/07/09 12:14 AM
T
TheWarlock
TheWarlock
T
i made this , a block private

on 1:open:?:{
if $query(0) < %query { .notice $Nick ya esta bloqueado el privado $query(0) | .close -c $nick | halt }
}

but doesnt work, any help ,thnx

%query == 5

thnx so much

#214125 20/07/09 12:50 AM
Joined: Dec 2002
Posts: 1,997
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 1,997

The switch you need to close a query window is -m

Code:

on *:OPEN:?: {
  if ($query(0) < %query) {
    .notice $Nick ya esta bloqueado el privado $query(0)
    close -m $nick
    halt
  }
}



RoCk #214126 20/07/09 05:58 AM
5
5618
5618
5
You need the ^ prefix though.
Code:
on ^*:OPEN:?: {

#214128 20/07/09 08:22 AM
T
TheWarlock
TheWarlock
T
thnx for the fast responding

RoCk #214129 20/07/09 08:23 AM
T
TheWarlock
TheWarlock
T
thnx for fast responding

#214136 20/07/09 03:01 PM
V
vexed2
vexed2
V
I use something similar myself, to show query stats in the window when it's initiated. It doesn't need the ^ prefix at all.

#214137 20/07/09 03:11 PM
Joined: Jan 2003
Posts: 2,125
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,125
To clarify, there are two ways of doing this:

1) on OPEN without the ^ prefix and /close -m, eg
Code:
on *:open:?: if (something) close -m $nick


2) on OPEN with the ^ prefix and /halt
Code:
on ^*:open:?: if (something) halt


The difference is that the first triggers just after the query window is opened, and uses /close -m to close it, thereby causing a flicker on screen, which may be significant if the "Iconify query window" option is not enabled.

The second method triggers before the query window is opened. Using /halt there stops it from opening. The latter method is obviously better as there's no flicker due to window opening/closing.

Of course, there is no need to use both /close -m and /halt in either case.

qwerty #214138 20/07/09 03:41 PM
Joined: Dec 2002
Posts: 1,997
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 1,997

I used the first because it seemed he was counting query windows which may need to include the triggering query(?), otherwise I would've suggested using the ^ prefix. So assuming that he had his reasons, I just fixed the error in his code (the -m switch) rather than trying to improve it.


Link Copied to Clipboard