Advance Query Control

Platform:  mIRC
Published  Feb 12, 2010
Updated  Feb 15, 2010
My advance query control, It has some features like.

  • Multiple Query Accept/Deny
  • Block List
  • Auto Accept List
  • Max 5 queries
  • Flood Control
  • On off Button :)
  • Accept all/deny all button
  • Query Information button


to use it, load it in your remote and right click anything that would normally bring up a menu. Then click the Query Settings button, Or you can type /Qset.
Please leave positive comments. Feel free to rip.

Quote


Tbh, when ripped it means somone liked it and wanted to duplicate it so thank you if you do :).
menu * {
-
Query Settings:qset
-
}
alias qset dialog -mo Querys Querys
dialog Querys {
title "Query Settings V1.5"
size -1 -1 117 106
option dbu
radio "Query Control On", 1, 2 9 55 10
radio "Query Control Off", 2, 2 22 55 10
box "Query Control", 3, 0 0 60 35
list 4, 5 55 50 50, size
list 5, 63 55 50 50, size
text "Auto Accept List", 6, 9 46 41 8
text "Query Ignore List", 7, 66 46 44 8
button "Open Query Manager", 8, 61 3 55 10
edit "Nick", 9, 24 36 70 10, autohs center
button "Add to AutoAccept", 10, 61 14 55 10
button "Add to AutoIgnore", 11, 61 25 55 10
}
alias qup {
var %x 1
did -r Querys 4
while ($gettok(%aa,%x,32)) {
did -a Querys 4 $v1
inc %x
}
if (%queryon) did -c Querys 1
else did -c Querys 2
var %x 1
did -r Querys 5
while ($ignore(%x)) {
if (private == $ignore(%x).type) did -a Querys 5 $bef(!,$ignore(%x)) $iif($ignore(%x).secs,$duration($v1))
inc %x
}
}

alias bef {
tokenize $asc($1) $2-
return $1
}
on *:dialog:Querys:*:*: {
tokenize 32 $did(9).text
if ($devent == init) qup
if ($devent == sclick) {
if ($did == 4) { $iif($?!"Do you want to delete this item?",remqur $did(4).seltext aa) | qup }
if ($did == 5) { $iif($?!"Do you want to delete this item?",.ignore -r $bef($chr(32),$did(5).seltext)) | qup }
if ($did == 1) set %queryon on
elseif ($did == 2) unset %queryon
if ($did == 8) { dialog -mo Query Query | rfs }
if ($did == 10) {
if (!$ignore($1)) .ignore -r $1
remqur $1 aa
set %aa %aa $1
qup
}
if ($did == 11) {
if ($1 isin %aa) remqur $1 aa
.ignore -p $1
qup
}
}
}
dialog Query {
option dbu
title "Query Manager"
size -l -l 151 100
list 1, 5 50 140 40,hsbar
button "Accept" 2, 1 5 50 10,disabled
button "Deny" 3, 51 5 50 10,disabled
Button "Ignore" 4, 101 5 50 10, disabled
Button "Add to auto accept list" 6, 30 15 90 10, disabled
Button "Deny All" 7, 5 80 70 10
Button "Accept All" 8, 75 80 74 10
text "", 10, 5 30 140 20
}
alias rfs {
if (!%query) did -ra Query 1
var %x $gettok(%query,0,32)
while (%x) {
did $+(-,$iif(%x == $gettok(%query,0,32),r),a) Query 1 $gettok(%query,%x,32) $iif($remove($address($gettok(%query,%x,32),0),*,!),$+($chr(40),$v1,$chr(41)),$+($chr(40),No Address Found,$chr(41)))
dec %x
}
}
alias qupdate {
allch b
did -f Query 1
rfs
did -ra Query 10
}
alias remqur {
var %x 1
tokenize 32 $1 $iif($2,$remove($v1,$chr(37)),query)
while ($gettok($eval(% $+ $2,3),%x,32)) {
if ($v1 != $1) var %newq %newq $v1
inc %x
}
set $eval(% $+ $2,1) %newq
}
on *:dialog:Query:*:*: {
if ($devent == sclick) {
tokenize 32 $did(1).seltext
if ($did == 1) && ($1) { allch e | .timer 1 1 noop $tip(Message,Information: $1,14Message:7 $hget(truemsg,$1) $crlf 14Common Channels:2 $comchan($1,0) $iif($comchan($1,1),- $v1) $iif($comchan($1,2),- $v1) $iif($comchan($1,3),- $v1) ) }
if ($did == 8) {
var %x $gettok(%query,0,32)
while (%x) {
tokenize 32 $gettok(%query,%x,32)
Query $1 Your request for a query has been accepted!
remqur $1
qupdate
dec %x
}
}
if ($did == 7) {
var %x $gettok(%query,0,32)
while (%x) {
tokenize 32 $gettok(%query,%x,32)
.msg $1 Your request for a query has been denied! Please try again in 5 minutes.
remqur $1
.ignore -u300p $1
qupdate
dec %x
}
}
if ($did == 6) {
Query $1 Your request for a query has been accepted!
remqur $1
qupdate
Set %aa %aa $1 $address($1,0)
}
if ($did == 4) {
remqur $1
.ignore -p $1
qupdate
}
if ($did == 2) {
Query $1 Your request for a query has been accepted!
remqur $1
qupdate
}
if ($did == 3) {
.msg $1 Your request for a query has been denied! Please try again in 5 minutes.
remqur $1
.ignore -p $1 300
qupdate
}
}
}
alias -l allch {
var %x 1
while (%x <= 4) {
did $+(-,$1) $dname $gettok(2 3 4 6,%x,32)
inc %x
}
}

alias nquery {
if (!$dialog(Query)) dialog -mo Query Query
if ($gettok(%query,0,32) < 5) || (!$gettok(%query,0,32)) {
set %query %query $1
rfs
.msg $1 Please wait while i decide to accept your query! $iif($away,I am currently away so it may take a while. My current idle time is: $duration($idle))
}
else {
did -ra Query 10 Emergency flood query control has been triggered, Please accept or deny some of your queries before you may accept any others!
rfs
}
}
on ^*:open:?:*: {
if (%Queryon) {
hadd -m Truemsg $nick $1-
if ($istok(%aa,$nick,32)) || ($istok(%aa,$iif($address($nick,0),$v1,all),32)) { query $nick Your query has been auto accepted! | goto finish }
if ($nick !isin %query) || (!%Query) { nquery $nick | hadd -m Truemsg $nick $1- }
halt
}
:finish
}

Comments

Sign in to comment.
Ghost-writer   -  Feb 13, 2010
Very nice, great for noobs on swiftirc who will botnet query you >.>.
 Respond  
sunslayer   -  Feb 12, 2010

Code

 
i dont like alot of empty unneeded space in dialogs, that looks better imo
also, when your listing the features instead of using [quote] you can use [list] instead i.e.
  • feature #1
  • feature #2
  • etc.
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.