mIRC Home    About    Download    Register    News    Help

Print Thread
#214124 20/07/09 12:14 AM
Joined: Nov 2007
Posts: 117
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2007
Posts: 117
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

TheWarlock #214125 20/07/09 12:50 AM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

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
Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
You need the ^ prefix though.
Code:
on ^*:OPEN:?: {

5618 #214128 20/07/09 08:22 AM
Joined: Nov 2007
Posts: 117
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2007
Posts: 117
thnx for the fast responding

RoCk #214129 20/07/09 08:23 AM
Joined: Nov 2007
Posts: 117
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2007
Posts: 117
thnx for fast responding

5618 #214136 20/07/09 03:01 PM
Joined: Mar 2007
Posts: 218
V
Fjord artisan
Offline
Fjord artisan
V
Joined: Mar 2007
Posts: 218
I use something similar myself, to show query stats in the window when it's initiated. It doesn't need the ^ prefix at all.

vexed2 #214137 20/07/09 03:11 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
qwerty #214138 20/07/09 03:41 PM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

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