mIRC Home    About    Download    Register    News    Help

Print Thread
#125467 18/07/05 09:53 AM
Joined: Jul 2005
Posts: 13
C
Pikka bird
OP Offline
Pikka bird
C
Joined: Jul 2005
Posts: 13
O hope someone can fix it
cause I'm newbie
Code:
 

on *:open:?: { var %i 5 
 while ($query(0) > %i ) 
 ignore -pu500 $address($nick,2) 
 close -m 
 inc %i 
} 
} 
 
 


I want that if there be more then 5 query windows opened
all the querys that will be pened after that
will be closed and ignore

#125468 18/07/05 11:14 AM
Joined: Nov 2003
Posts: 25
N
Ameglian cow
Offline
Ameglian cow
N
Joined: Nov 2003
Posts: 25
Try this:

Code:
on ^*:open:?: {
  var %i = 5 
  if ($query(0) >= %i) {
    ignore -pu500 $mask($fulladdress,2)
    [color:red]while ($query(0) > %i) {
      close -m $query($v1)
    }[/color]
    halt
  } 
} 


This will prevent new query windows from opening once there are 5 of more opened already. It will also close the query windows until there are only 5 left.

But... since the only way to get more than 5 query windows is opening new queries yourself, you may want to omit the red part. For example: there are 5 queries open and you open a new query window yourself. While you are typing in this window, someone else sends you a private message, which gets ignored but also causes the window you're typing in to be closed.

I hope this helps in what you're trying to do.

#125469 19/07/05 03:45 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
ON ^*:OPEN:?:*:{ if ($query(0) > 5) { halt } }

That works just as well, since it blocks the window opening, the user is ignored, and instantly there is not 5 windows the next pm'er isnt.

It also allows you to open greater than 5 pm windows without the chance of them being closed by a unreleated PM comming in, which i would find highly annoying. (you did mention this tho)

PS: I bet this is for search replies!

#125470 19/07/05 11:11 AM
Joined: Jul 2005
Posts: 13
C
Pikka bird
OP Offline
Pikka bird
C
Joined: Jul 2005
Posts: 13
thank u all! smile


Link Copied to Clipboard