mIRC Home    About    Download    Register    News    Help

Print Thread
#52368 03/10/03 09:11 AM
Joined: Jan 2003
Posts: 48
O
oSaYaP Offline OP
Ameglian cow
OP Offline
Ameglian cow
O
Joined: Jan 2003
Posts: 48
I wanna make a remote that limit querys up to 5 querys
how can i do that ?


-= Porque pese a todo Dios .. aún te tengo fé =-
#52369 03/10/03 11:34 AM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
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...



Code:
//if ( khaled isgod ) echo yes | else echo no
#52370 03/10/03 12:53 PM
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
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.

* cold edits his posts 24/7
#52371 03/10/03 02:06 PM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
True, thanks. Just fixed it.


* cold edits his posts 24/7

Link Copied to Clipboard