mIRC Home    About    Download    Register    News    Help

Print Thread
#52368 03/10/03 09:11 AM
O
oSaYaP
oSaYaP
O
I wanna make a remote that limit querys up to 5 querys
how can i do that ?

#52369 03/10/03 11:34 AM
T
theRat
theRat
T
on *:open:?: if ( $query(0) > 5 ) { msg $nick I'm lost with all the queries I have, please try again later | close -m $nick }

or something along that...


#52370 03/10/03 12:53 PM
Joined: Feb 2003
Posts: 806
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 806
Edit: fixed
Code:
on ^*:open:?:*:{
  if ($query(0) [color:red]> 4[/color]) {
    !.msg $nick Sorry, I've reached my limit of open queries. Please try again later.

    ; You can remove the line below if you don't want to be warned:
    echo $color(info) -tai2 * $nick has sent a message

    halt
  }
}

Last edited by cold; 03/10/03 02:13 PM.
#52371 03/10/03 02:06 PM
Joined: Dec 2002
Posts: 1,893
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,893
I'd stick to the idea of > 5 (or > 4 in this case, since ^ triggers the event before the current window is added to the $query() count), because if you open several queries manually (/query nick) and have more than 5 windows open, the event will not close further windows anymore.

#52372 03/10/03 02:10 PM
Joined: Feb 2003
Posts: 806
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 806
True, thanks. Just fixed it.


Link Copied to Clipboard