Public feed #530624

Stuff

public text v1 · immutable
Raw Edit
·published 2007-06-02 05:12 UTC
rendered paste body
########################################################################################################################################### 
########################################################### The Pharoah's Ultimate Query Manager ########################################## 
#################################################### Made by Jonathan of SeersIRC and Eragonj of SwiftIRC ################################# 
########################################################################################################################################### 
; Version: 1.4 
; Line Estimate: 680 
; Pictures: 
;Main Tab, the "Color?" button, and The Messages dropdown: http://img48.imageshack.us/img48/6173/querymanager1vn3.jpg 
;User Tab and Query waiter popup: http://img47.imageshack.us/img47/9206/querymanager2hr6.jpg 
;Logging tab and the two dropdowns in mIRC: http://img465.imageshack.us/img465/6140/querymanager3yy6.jpg 
; Files: (automatically created when first using the script - all are INI files) 
;qm.ini - qmlog.ini - qmalog.ini 
; Edit the script (discluding title alias) to your own liking and risk 
; Check out SeersIRC at irc.seersirc.net ~ #mIRC 
; NOTE: THE FIRST TIME USING, AN ERROR MESSAGE WILL ECHO; PLEASE IGNORE THIS AS IT WILL NOT HAPPEN AGAIN! 
dialog QM { 
  option dbu 
  size -1 -1 222 232 
  title "~! Query Manager -" 
  button "Close", 1, 167 203 50 14, ok 
  edit "", 3, 5 203 157 24, multi 
  text "Query Manager v1.4", 51, 167 220 70 10 
  tab "Settings", 2, 5 5 212 194 
  tab "Users", 15 
  tab "Logging", 30 
  box "Colors", 16, 15 25 98 57, tab 2 
  text "First Color (1-15):", 4, 20 38 43 9, tab 2 
  edit "", 5, 64 37 12 10, tab 2 
  button "Change", 6, 77 36 25 12, tab 2 
  text "Second Color (1-15):", 7, 20 56 50 9, tab 2 
  edit "", 8, 71 55 12 10, tab 2 
  button "Change", 9, 84 54 25 12, tab 2 
  check "Color Strip", 17, 25 68 35 10, tab 2 
  text "Color is Stripped!", 18, 20 50 50 10, tab 2 
  box "The Messages", 10, 15 92 85 60, tab 2 
  combo 11, 25 105 60 12, tab 2 drop 
  edit "", 12, 20 116 70 12, tab 2, return autohs 
  button "Update", 13, 26 128 29 12, tab 2 
  button "Color?", 14, 66 128 23 12, tab 2 
  box "Query Settings", 40, 125 25 86 70, tab 2 
  text "Seconds before", 41, 130 40 40 9, tab 2 
  text "Time-Out:", 42, 144 47 35 9, tab 2 
  edit "", 43, 170 42 12 11, tab 2 
  button "Change", 44, 183 42 25 11, tab 2 
  check "Auto Accept All", 45, 130 60 45 10, tab 2 
  check "Auto Decline All", 46, 130 73 45 10, tab 2 
  list 19, 12 80 80 120, tab 15 
  button "Add", 23, 12 69 39 11, tab 15 
  button "Delete", 24, 52 69 41 11, tab 15 
  list 20, 130 80 80 120, tab 15 
  button "Add", 25, 130 69 39 11, tab 15 
  button "Delete", 26, 170 69 41 11, tab 15 
  button "Block >", 21, 95 90 30 14, tab 15 
  button "< Allow", 22, 95 130 30 14, tab 15 
  box "Adding", 27, 18 25 54 37, tab 15 
  check "Add by Nick", 28, 28 35 40 10, tab 15 
  check "Add by Host", 29, 28 45 40 10, tab 15 
  box "Log When", 31, 18 25 50 35, tab 30 
  check "Normal", 32, 26 34 40 10, tab 30 
  check "Away", 33, 26 45 40 10, tab 30 
  button "Disable Logging", 34, 80 30 50 25, tab 30 
  button "Enable Logging", 35, 80 30 50 25, tab 30 
  box "Away Log", 39, 13 65 95 132, tab 30 
  edit "", 36, 21 85 80 105, tab 30, multi, vsbar 
  button "Refresh", 37, 21 74 39 11, tab 30 
  button "Delete All", 38, 60 74 41 11, tab 30 
  box "Normal Log", 47, 115 65 95 132, tab 30 
  edit "", 48, 123 85 80 105, tab 30, multi, vsbar 
  button "Refresh", 49, 123 74 39 11, tab 30 
  button "Delete All", 50, 162 74 41 11, tab 30 
} 
on *:dialog:QM:mouse:*:{ 
  if ($did !isnum 1-51) var %x = Hover your mouse over an item to retrieve the description! 
  elseif ($did == 1) var %x = Click here to exit from this dialog!
  elseif ($did == 2) var %x = Control the settings of the Query Manager in this tab. 
  elseif ($did == 3) var %x = Hover your mouse over an item to retrieve the description! 
  elseif ($did == 10) var %x = Edit the message responses during a query. Use color with it, pick a message to edit, edit the message, and click "Update" to update it. 
  elseif ($did == 16) var %x = Edit the colors used in the echo's. Click "Change" and enter a number 1-15 to change one of them. You do not edit the box directly. Or strip the color. 
  elseif ($did == 19) var %x = The users/hosts currently on Auto Accept. 
  elseif ($did == 20) var %x = The users/hosts currently on Auto Decline. 
  elseif ($did == 21) var %x = Move a user/host on accept to block. 
  elseif ($did == 22) var %x = Move a user/host on block to accept. 
  elseif ($did == 23) var %x = Add a user/host to your Auto Accept List. 
  elseif ($did == 24) var %x = Delete a user/host from your Auto Accept List. 
  elseif ($did == 25) var %x = Add a user/host to your Auto Decline List. 
  elseif ($did == 26) var %x = Delete a user/host from your Auto Decline List. 
  elseif ($did == 27) var %x = Control how you add users to your lists with the popups. Adding by nick or adding by host; you have to have at least one checked always. 
  elseif ($did == 28) var %x = Add nicks to the list with the popups. 
  elseif ($did == 29) var %x = Add hosts to the list with the popups. 
  elseif ($did == 31) var %x = Control when you log; while normally at the computer or away with the /away mIRC function. 
  elseif ($did == 34) var %x = Disable the whole logging system. You can enable it again if you want to. 
  elseif ($did == 35) var %x = Enable the whole logging system. You can disable it again if you want to. 
  elseif ($did == 39) var %x = This is your Away Log Box. Refresh it or delete all of the messages in it. 
  elseif ($did == 40) var %x = Control extra query settings. Change the ammount of the before a Time-Out Block, Accept All Queries, or Decline All Queries. 
  elseif ($did == 47) var %x = This is your Normal Log Box. Refresh it or delete all of the messages in it. 
  elseif ($did == 51) var %x = The current version of Eragonj/Jonathan's Query Manager. 
  if (%x) did -ra QM 3 %x 
  unset %x 
} 
menu * { 
  Open Query Manager { 
    if ($dialog(QM)) dialog -x QM 
dialog -m QM QM } } 
menu Query,Nicklist { 
  Query Manager 
  .Auto Accept $1 $+ :/qmaa $1 
  .Auto Decline $1 $+ :/qmad $1 
} 
alias qmaa { 
  var %x = $readini(qm.ini,Other,ANick) | var %y = $readini(qm.ini,Other,AHost) 
  var %z = $readini(qm.ini,AD,$1) | var %a = $readini(qm.ini,AD,$address($1,2)) 
  if (%x == ON && %y == ON) { 
    qmi AA $1 ON | qmi AA $address($1,2) ON 
    if (%z == ON) { qmri AD $1 } 
  if (%a == ON) { qmri AD $address($1,2) } } 
  if (%x == ON && %y == $null) { 
    qmi AA $1 ON 
    if (%z == ON) { qmri AD $1 } 
  if (%a == ON) { qmri AD $address($1,2) } } 
  if (%y == ON && %x == $null) { 
    qmi AA $address($1,2) ON 
    if (%z == ON) { qmri AD $1 } 
  if (%a == ON) { qmri AD $address($1,2) } } 
  qme $qma(The) $qmb(lists) $qma(have been adjusted) $qmb(accordingly) $+  $+ $readini(qm.ini,Color,1) $+ . 
} 
alias qmad { 
  var %x = $readini(qm.ini,Other,ANick) | var %y = $readini(qm.ini,Other,AHost) 
  var %z = $readini(qm.ini,AA,$1) | var %a = $readini(qm.ini,AA,$address($1,2)) 
  if (%x == ON && %y == ON) { 
    qmi AD $1 ON | qmi AD $address($1,2) ON 
    if (%z == ON) { qmri AA $1 } 
  if (%a == ON) { qmri AA $address($1,2) } } 
  if (%x == ON && %y == $null) { 
    qmi AD $1 ON 
    if (%z == ON) { qmri AA $1 } 
  if (%a == ON) { qmri AA $address($1,2) } } 
  if (%y == ON && %x == $null) { 
    qmi AD $address($1,2) ON 
    if (%z == ON) { qmri AA $1 } 
  if (%a == ON) { qmri AA $address($1,2) } } 
  qme $qma(The) $qmb(lists) $qma(have been adjusted) $qmb(accordingly) $+  $+ $readini(qm.ini,Color,1) $+ . 
} 
alias qma { 
  if ($readini(qm.ini,Other,CS) == ON) { 
  return $+($1-) | halt } 
  return $+( $+ $readini(qm.ini,Color,1) $+ ,$1- $+ ) 
} 
alias qmb { 
  if ($readini(qm.ini,Other,CS) == ON) { 
  return $+($1-) | halt } 
  return $+( $+ $readini(qm.ini,Color,2) $+ ,$1- $+ ) 
} 
alias qmd { did - $+ $1 QM $2- } 
alias qme { echo -a $1- } 
alias qmri { remini qm.ini $1- } 
alias qmi { writeini qm.ini $1- } 
on *:dialog:QM:close:0:{ 
  unset %qm.* 
  if ($dialog(qmcolorhelp)) dialog -x qmcolorhelp 
} 
on *:dialog:QM:init:0:{ 
  if ($ini(qm.ini,Color,1) == $null) qmdefaults 
  if ($readini(qm.ini,Other,CS) == ON) { 
    qmd h 4,5,6,7,8,9 | qmd v 18 | qmd ra 5 1 | qmd ra 8 1 
    qmd c 17 | qmd m 3,5,8,12 
    qmd ra 11 Wait | qmd a 11 Accepted | qmd a 11 Declined 
  qmd a 11 Auto Accept | qmd a 11 Auto Decline } 
  if ($readini(qm.ini,Other,CS) == $null) { qmd h 18 } 
  if ($readini(qm.ini,Other,ANick) == ON) { 
  qmd c 28 } 
  if ($readini(qm.ini,Other,AHost) == ON) { 
  qmd c 29 } 
  if ($readini(qm.ini,Other,LOGA) == ON && $readini(qm.ini,Other,LOG) == OFF && $readini(qm.ini,Other,ALOG) == OFF) { 
  qmd h 34 | qmd b 31,32,33,36,37,38 } 
  if ($readini(qm.ini,Other,LOGA) == ON && $readini(qm.ini,Other,LOG) == ON || $readini(qm.ini,Other,ALOG) == ON) { qmd h 35 } 
  if ($readini(qm.ini,Other,LOGA) == OFF) { qmd h 34 
  qmd b 31,32,33,36,37,38 } 
  if ($readini(qm.ini,Other,AAA) == ON) { qmd c 45 } 
  qmd m 3,5,8,12,36,43,48 | qmd b 21,22,24,26 
  qmd ra 5 $readini(qm.ini,Color,1) | qmd ra 8 $readini(qm.ini,Color,2) 
  qmd ra 43 $readini(qm.ini,Other,SECS) 
  qmd ra 11 Wait | qmd a 11 Time-Out | qmd a 11 Accepted | qmd a 11 Declined 
  qmd a 11 Away | qmd a 11 Auto Accept | qmd a 11 Auto Decline 
  qmtfix 
  did -ra QM 3 Hover your mouse over an item to retrieve the description! 
  if ($readini(qm.ini,Other,LOG) == ON) { qmd c 32 | qmlistdoNL } 
} 
alias qmdefaults { 
  qmi Color 1 1 
  qmi Color 2 1 
  qmi Other ANick ON 
  qmi Other LOG ON 
  qmi Other ALOG ON | writeini qmlog.ini MSG Normal Log 
  writeini qmalog.ini MSG Away Log | qmi Other LOGA ON 
  qmi Other SECS 15 
  qmi MSG Wait Please wait... 
  qmi MSG Your message has been blocked. ( Timed-Out - $readini(qm.ini,Other,SECS) Seconds ) 
  qmi MSG Accepted Your message has been accepted and I have recieved your first message! 
  qmi MSG Declined Your message has been blocked. 
  qmi MSG Away I most likely will not answer because I am away. 
  qmi MSG Auto_Accept Your message has been automatically accepted! 
  qmi MSG Auto_Decline Your message has been automatically blocked. 
  qme The default settings have been loaded for the Query Manager. 
} 
on *:open:?:{ 
  if ($readini(qm.ini,Other,LOG) == ON && $away == $false) { 
  writeini qmlog.ini MSG $calc($ini(qmlog.ini,MSG,0) + 1) $time(m/d hh:nn:ss TT) $+ * $+ $nick $+ * $+ $1- } 
  if ($readini(qm.ini,Other,ALOG) == ON && $away == $true) { 
  writeini qmalog.ini MSG $calc($ini(qmalog.ini,MSG,0) + 1) $time(m/d hh:nn:ss TT) $+ * $+ $nick $+ * $+ $1- } 
  if ($readini(qm.ini,Other,AAA) == ON) { 
    .msg $nick $qmgm(Auto_Accept) (Auto Accepting All) | window -a $nick 
  if ($away == $true) .msg $nick $qmgm(Away) | halt } 
  if ($readini(qm.ini,Other,ADA) == ON) { 
  .msg $nick $qmgm(Auto_Decline) (Auto Declining All) | close -m $nick | halt } 
  if ($away == $true) { .msg $nick $qmgm(Away) } 
  if ($readini(qm.ini,AA,$nick) == ON || $readini(qm.ini,AA,$address($nick,2)) == ON) { 
    .msg $nick $qmgm(Auto_Accept) | window -a $nick 
  qmwaitechom Auto_Accept $nick $1- | halt } 
  if ($readini(qm.ini,AD,$nick) == ON || $readini(qm.ini,AD,$address($nick,2)) == ON) { 
    .msg $nick $qmgm(Auto_Decline) | close -m $nick 
  qmwaitechom Auto_Decline $nick $1- | halt } 
  window -h $nick 
  .msg $nick $qmgm(Wait) 
  set %qm.waiter.N $nick | set %qm.waiter.M $1- 
  dialog -m QMWait QMWait 
} 
alias qmwaitechom { 
  echo -s 1~ $qmb( $+ $replace($1,$chr(95),$chr(32)) $+ ) ( $time(hh:nn:ss TT) ) 1- $qma(Nick:) $& 
    $+  $+ $readini(qm.ini,Color,2) $2 1- $qma(Message:) $qmb( $+ $3- $+ ) 1- 
} 
dialog QMWait { 
  option dbu 
  size -1 -1 150 75 
  title "Seconds until block:" 
  text "Nick:", 1, 5 7 12 10 
  edit "", 2, 19 6 90 10, return autohs 
  text "Channels in Common:", 3, 5 22 56 10 
  edit "", 4, 58 20 85 10, return autohs 
  text "Message:", 9, 5 37 36 10 
  edit "", 10, 32 35 100 10, return autohs 
  text "Scroll over in the boxes if longer", 11, 9 48 90 10 
  button "Accept", 5, 3 57 30 14 
  button "Decline", 6, 35 57 30 14 
  button "Auto Accept", 7, 67 57 38 14 
  button "Auto Decline", 8, 107 57 38 14 
} 
on *:dialog:QMWait:sclick:5-8:{ 
  if ($did == 5) { 
    .msg %qm.waiter.N $qmgm(Accepted) 
    window -wa %qm.waiter.N 
    if ($timer(qmwait)) .timerqmwait off 
  unset %qm.waiter.* | dialog -x QMWait } 
  elseif ($did == 6) { 
    .msg %qm.waiter.N $qmgm(Declined) 
    close -m %qm.waiter.N 
    if ($timer(qmwait)) .timerqmwait off 
  unset %qm.waiter.* | dialog -x QMWait } 
  elseif ($did == 7) { qmaa %qm.waiter.N 
    .msg %qm.waiter.N $qmgm(Auto_Accept) 
    window -wa %qm.waiter.N 
    if ($timer(qmwait)) .timerqmwait off 
  unset %qm.waiter.* | dialog -x QMWait } 
  elseif ($did == 8) { qmad %qm.waiter.N 
    .msg %qm.waiter.N $qmgm(Auto_Decline) 
    close -m %qm.waiter.N 
    if ($timer(qmwait)) .timerqmwait off 
  unset %qm.waiter.* | dialog -x QMWait } 
} 
on *:dialog:QMWait:init:0:{ 
  did -ra QMWait 2 %qm.waiter.N 
  did -m QMWait 2,4,10 | did -ra QMWait 10 %qm.waiter.M 
  dialog -t QMWait Seconds until block: $readini(qm.ini,Other,SECS) 
  set %qm.waiter.S $readini(qm.ini,Other,SECS) 
  .timerqmwait 1 1 qmwaittire 
  qmwaitccs 
} 
alias qmwaitccs { 
  if ($comchan(%qm.waiter.N,0) == 0) { did -ra QMWait 4 None | halt } 
  set %qm.waiter.CT $comchan(%qm.waiter.N,0) 
  set %qm.waiter.CN 0 
  qmwaitccss 
} 
alias qmwaitccss { 
  inc %qm.waiter.CN 1 
  if (%qm.waiter.CT == $calc(%qm.waiter.CN - 1)) { halt } 
  did -a QMWait 4 $comchan(%qm.waiter.N,%qm.waiter.CN) 
  qmwaitccsss 
} 
alias qmwaitccsss { qmwaitccss } 
alias qmwaittire { 
  if ($calc(%qm.waiter.S - 1) == -1) { .msg %qm.waiter.N $qmgm(Time-Out) 
    qmwaitechom Time-Out %qm.waiter.N %qm.waiter.M | close -m %qm.waiter.N 
  unset %qm.waiter.* | dialog -x QMWait | halt } 
  dec %qm.waiter.S 1 
  dialog -t QMWait Seconds until block: %qm.waiter.S 
  qmwaittiree 
} 
on *:dialog:QMWait:close:0:{ 
  .msg %qm.waiter.N $qmgm(Declined) 
  qmwaitechom Exit_Blocked %qm.waiter.N %qm.waiter.M 
  close -m %qm.waiter.N 
  unset %qm.waiter.* 
  if ($timer(qmwait)) .timerqmwait off 
} 
alias qmwaittiree { .timerqmwait 1 1 qmwaittire } 
alias qmtfix { 
  dialog -t QM ~! Query Manager - $& 
    By Eragonj-SwiftIRC & Jonathan-SeersIRC 
} 
on *:dialog:QM:sclick:*:{ 
  if ($did == 6) { 
    var %qm.yy = $did(5) 
    var %qm.yyy = $did(8) 
    set %qm.change.c1 $?="Enter Number 1-15" 
    if ($len(%qm.change.c1) > 2 || $len(%qm.change.c1) < 1) { qme $qma(There can only be) $+  $+ %qm.yyy 1 $qma(or) $& 
      $+  $+ %qm.yyy 2 $qma(digits in the) $qmb(color slot) $+  $+ %qm.yy $+ . | unset %qm.change.c1 | halt } 
    if (%qm.change.c1 !isnum 1-15) { qme $qma(The) $qmb(numbers) $qma(can only be from) $+  $+ %qm.yyy 1 $qma(to) $& 
      $+  $+ %qm.yyy 15 $qma(in the) $qmb(color slot) $+  $+ %qm.yy $+ . | unset %qm.change.c1 | halt } 
    qmd ra 5 %qm.change.c1 | qmi Color 1 %qm.change.c1 
    qme $qmb(Color) $qma(has been) $qmb(changed) $+  $+ %qm.yy $+ . 
    unset %qm.y* 
  unset %qm.change.c1 } 
  elseif ($did == 9) { 
    var %qm.yy = $did(5) 
    var %qm.yyy = $did(8) 
    set %qm.change.c2 $?="Enter Number 1-15" 
    if ($len(%qm.change.c2) > 2 || $len(%qm.change.c2) < 1) { qme $qma(There can only be) $+  $+ %qm.yyy 1 $qma(or) $& 
      $+  $+ %qm.yyy 2 $qma(digits in the) $qmb(color slot) $+  $+ %qm.yy $+ . | unset %qm.change.c2 | halt } 
    if (%qm.change.c2 !isnum 1-15) { qme $qma(The) $qmb(numbers) $qma(can only be from) $+  $+ %qm.yyy 1 $qma(to) $& 
      $+  $+ %qm.yyy 15 $qma(in the) $qmb(color slot) $+  $+ %qm.yy $+ . | unset %qm.change.c2 | halt } 
    qmd ra 8 %qm.change.c2 | qmi Color 2 %qm.change.c2 
    qme $qmb(Color) $qma(has been) $qmb(changed) $+  $+ %qm.yy $+ . 
    unset %qm.y* 
  unset %qm.change.c2 } 
  elseif ($did == 11) { 
    if ($len($did(11).seltext) < 9) { 
      qmd n 12 
      set %qm.change.catagory $did(11).seltext 
    qmd ra 12 $readini(qm.ini,MSG,%qm.change.catagory) } 
    elseif (*-* iswm $did(11).seltext && *Time* iswm $did(11).seltext) { 
      qmd n 12 
      set %qm.change.catagory Time-Out 
    qmd ra 12 $readini(qm.ini,MSG,Time-Out) } 
    elseif (*D* iswm $did(11).seltext && $len($did(11).seltext) > 9) { 
      qmd n 12 
      set %qm.change.catagory Auto_Decline 
    qmd ra 12 $readini(qm.ini,MSG,%qm.change.catagory) } 
    elseif (*A* iswm $did(11).seltext && $len($did(11).seltext) > 9) { 
      qmd n 12 
      set %qm.change.catagory Auto_Accept 
  qmd ra 12 $readini(qm.ini,MSG,%qm.change.catagory) } } 
  elseif ($did == 13) { 
    if (%qm.change.catagory == $null) { qme $qmb(Pick) $qma(a) $qmb(message) $qma(to) $qmb(edit) $qma(first!) | halt } 
    var %qm.yy = $did(5) 
    var %qm.yyy = $did(8) 
    qmi MSG %qm.change.catagory $did(12) 
    qme $qma(The) $qmb(message) $qma(for) $+  $+ %qm.yyy $did(11).seltext $qma(has been) $qmb(replaced) $qma(with) $& 
      $qma(") $+  $+ $readini(qm.ini,MSG,%qm.change.catagory) $+ $qma(") 
    qmd r 12 | qmd ra 11 Wait | qmd a 11 Time-Out | qmd a 11 Accepted | qmd a 11 Declined 
    qmd a 11 Away | qmd a 11 Auto Accept | qmd a 11 Auto Decline 
    qmd m 12 
    unset %qm.change.catagory 
  unset %qm.y* } 
  elseif ($did == 14) { dialog -m qmcolorhelp qmcolorhelp } 
  elseif ($did == 15) { 
  qmlistdoB } 
  elseif ($did == 17) { 
    var %qm.yy = $did(5) 
    if ($did(17).state == 1) { 
      qmd h 4,5,6,7,8,9 | qmd v 18 
      qmd ra 5 1 | qmd ra 8 1 | qmi Other CS ON 
    qme $qmb(Color Strip) $qma(is now) $qmb(enabled) $+  $+ %qm.yy $+ . } 
    elseif ($did(17).state == 0) { 
      qmri Other CS | qmd v 4,5,6,7,8,9 | qmd h 18 
      qmd ra 5 $readini(qm.ini,Color,1) | qmd ra 8 $readini(qm.ini,Color,2) 
  qme $qmb(Color Strip) $qma(is now) $qmb(disabled) $+  $+ %qm.yy $+ . } } 
  elseif ($did == 19) { 
    if ($did(20).seltext != $null) { 
      if (*~* iswm $did(19).seltext) { qmd u 19 | qmd b 21,22,24,26 | halt } 
    qmd u 20 | qmd b 22,26 | qmd e 21,24 | halt } 
    if (*~* iswm $did(19).seltext) { qmd u 19 | qmd b 21,24 | halt } 
  qmd e 21,24 } 
  elseif ($did == 20) { 
    if ($did(19).seltext != $null) { 
      if (*~* iswm $did(20).seltext) { qmd u 20 | qmd b 21,22,24,26 | halt } 
    qmd u 19 | qmd b 21,24 | qmd e 22,26 | halt } 
    if (*~* iswm $did(20).seltext) { qmd u 20 | qmd b 22,26 | halt } 
  qmd e 22,26 } 
  elseif ($did == 21) { 
    var %qm.yy = $did(5) 
    qmi AD $did(19).seltext ON 
    qmri AA $did(19).seltext | qmd b 21,24 
    qme $qma(The) $qmb(selected) $qma(has been) $qmb(moved) $qma(to) $& 
      $qmb(Auto Decline List) 1- $qmb(lists) $qma(are) $qmb(refreshing) $+  $+ %qm.yy $+ . 
  qmlistdoB } 
  elseif ($did == 22) { 
    var %qm.yy = $did(5) 
    qmi AA $did(20).seltext ON 
    qmri AD $did(20).seltext | qmd b 22,26 
    qme $qma(The) $qmb(selected) $qma(has been) $qmb(moved) $qma(to) $& 
      $qmb(Auto Accept List) 1- $qmb(lists) $qma(are) $qmb(refreshing) $+  $+ %qm.yy $+ . 
  qmlistdoB } 
  elseif ($did == 28) { 
    var %qm.yy = $did(5) 
    var %qm.yyy = $did(8) 
    if ($did(28).state == 1) { 
      qmi Other ANick ON 
    qme $qmb(Adding) $qma(by) $qmb(Nick) $qma(is now) $qmb(enabled) $+  $+ %qm.yy $+ . } 
    elseif ($did(28).state == 0) { 
      if ($did(29).state == 0) { qme $qma(You) $qmb(must) $qma(have at least) $+  $+ %qm.yyy 1 $& 
        $qma(adding feature) $qmb(enabled) $qma(at once.) | qmd c 28 | halt } 
      qmri Other ANick 
  qme $qmb(Adding) $qma(by) $qmb(Nick) $qma(is now) $qmb(disabled) $+  $+ %qm.yy $+ . } } 
  elseif ($did == 29) { 
    var %qm.yy = $did(5) 
    var %qm.yyy = $did(8) 
    if ($did(29).state == 1) { 
      qmi Other AHost ON 
    qme $qmb(Adding) $qma(by) $qmb(Host) $qma(is now) $qmb(enabled) $+  $+ %qm.yy $+ . } 
    elseif ($did(29).state == 0) { 
      if ($did(28).state == 0) { qme $qma(You) $qmb(must) $qma(have at least) $+  $+ %qm.yyy 1 $& 
        $qma(adding feature) $qmb(enabled) $qma(at once.) | qmd c 29 | halt } 
      qmri Other AHost 
  qme $qmb(Adding) $qma(by) $qmb(Host) $qma(is now) $qmb(disabled) $+  $+ %qm.yy $+ . } } 
  elseif ($did == 23) { 
    var %qm.yy = $did(5) 
    var %qm.yyy = $did(8) 
    if ($did(28).state == 1 && $did(29).state == 0) { 
      set %qm.add.AA $?="Enter Nick" 
      if (%qm.add.AA == $null) { qme $qma(Enter a) $qmb(nick) $qma(first!) | halt } 
      qmi AA %qm.add.AA ON 
      qmlistdoA 
      qme $qma(The nick) $+  $+ %qm.yyy %qm.add.AA $qma(has been added to the) $qmb(Auto Accept List) $& 
        1- $qmb(list) $qma(is) $qmb(refreshing) $+  $+ %qm.yy $+ . 
    unset %qm.add.AA } 
    elseif ($did(28).state == 0 && $did(29).state == 1) { 
      set %qm.add.AA $?="Enter Host Without *!*" 
      if (*@* !iswm %qm.add.AA) { qme $qma(Error in) $qmb(host format) $+  $+ %qm.yy $+ ! $qmb(@Host) 
      unset %qm.add.AA | halt } 
      qmi AA *!* $+ %qm.add.AA ON 
      qmlistdoA 
      qme $qma(The host) $+  $+ %qm.yyy *!* $+ %qm.add.AA $qma(has been added to the) $qmb(Auto Accept List) $& 
        1- $qmb(list) $qma(is) $qmb(refreshing) $+  $+ %qm.yy $+ . 
    unset %qm.add.AA } 
    elseif ($did(28).state == 1 && $did(29).state == 1) { 
      set %qm.add.AAN $?="Enter Nick" 
      set %qm.add.AAH *!* $+ $?="Enter Host Without *!*" 
      if (%qm.add.AAN == $null) { qme $qma(Enter a) $qmb(nick) $qma(first!) | halt } 
      if (*@* !iswm %qm.add.AAH) { qme $qma(Error in) $qmb(host format) $+  $+ %qm.yy $+ ! $qmb(@Host) 
      unset %qm.add.AAN | unset %qm.add.AAH | halt } 
      qmi AA %qm.add.AAN ON 
      qmi AA %qm.add.AAH ON 
      qme $qma(The nick) $+  $+ %qm.yyy %qm.add.AAN $qma(and the host) $+  $+ %qm.yyy %qm.add.AAH $& 
        $qma(has been added to the) $qmb(Auto Accept List) 1- $qmb(list) $qma(is) $qmb(refreshing) $+  $+ %qm.yy $+ . 
      qme $qma(It will only add the host) $qmb(automatically) $qma(if you use it by) $& 
        $qmb(right clicking) $qma(on a) $qmb(nick) $qma(in a) $qmb(channel) $+  $+ %qm.yy $+ . 
  qmlistdoA | unset %qm.add.AAN | unset %qm.add.AAH } } 
  elseif ($did == 24) { 
    var %qm.yy = $did(5) 
    var %qm.yyy = $did(8) 
    if (*@* iswm $did(19).seltext) { qme $qma(The host) $+  $+ %qm.yyy $did(19).seltext $qma(has been deleted from the) $& 
      $qmb(Auto Accept List) 1- $qmb(list) $qma(is) $qmb(refreshing) $+  $+ %qm.yy $+ . | qmd b 21,24 } 
    if (*@* !iswm $did(19).seltext) { qme $qma(The nick) $+  $+ %qm.yyy $did(19).seltext $qma(has been deleted from the) $& 
      $qmb(Auto Accept List) 1- $qmb(list) $qma(is) $qmb(refreshing) $+  $+ %qm.yy $+ . | qmd b 21,24 } 
  qmri AA $did(19).seltext | qmlistdoA | unset %qm.y* } 
  elseif ($did == 25) { 
    var %qm.yy = $did(5) 
    var %qm.yyy = $did(8) 
    if ($did(28).state == 1 && $did(29).state == 0) { 
      set %qm.add.AD $?="Enter Nick" 
      qmi AD %qm.add.AD ON 
      qmlistdoD 
      qme $qma(The nick) $+  $+ %qm.yyy %qm.add.AD $qma(has been added to the) $qmb(Auto Decline List) $& 
      1- $qmb(list) $qma(is) $qmb(refreshing) $+  $+ %qm.yy $+ . | unset %qm.add.AD } 
    elseif ($did(28).state == 0 && $did(29).state == 1) { 
      set %qm.add.AD $?="Enter Host Without *!*" 
      if (*@* !iswm %qm.add.AD) { qme $qma(Error in) $qmb(host format) $+  $+ %qm.yy $+ ! $qmb(@Host) 
      unset %qm.add.AD | halt } 
      qmi AD *!* $+ %qm.add.AD ON 
      qmlistdoD 
      qme $qma(The host) $+  $+ %qm.yyy *!* $+ %qm.add.AD $qma(has been added to the) $qmb(Auto Decline List) $& 
        1- $qmb(list) $qma(is) $qmb(refreshing) $+  $+ %qm.yy $+ . 
    unset %qm.add.AD } 
    elseif ($did(28).state == 1 && $did(29).state == 1) { 
      set %qm.add.ADN $?="Enter Nick" 
      set %qm.add.ADH *!* $+ $?="Enter Host Without *!*" 
      if (*@* !iswm %qm.add.ADH) { qme $qma(Error in) $qmb(host format) $+  $+ %qm.yy $+ ! $qmb(@Host) 
      unset %qm.add.ADN | unset %qm.add.ADH | halt } 
      qmi AD %qm.add.ADN ON 
      qmi AD %qm.add.ADH ON 
      qme $qma(The nick) $+  $+ %qm.yyy %qm.add.ADN $qma(and the host) $+  $+ %qm.yyy %qm.add.ADH $& 
        $qma(has been added to the) $qmb(Auto Decline List) 1- $qmb(list) $qma(is) $qmb(refreshing) $+  $+ %qm.yy $+ . 
      qme $qma(It will only add the host) $qmb(automatically) $qma(if you use it by) $& 
        $qmb(right clicking) $qma(on a) $qmb(nick) $qma(in a) $qmb(channel) $+  $+ %qm.yy $+ . 
  qmlistdoD | unset %qm.add.ADN | unset %qm.add.ADH } } 
  elseif ($did == 26) { 
    var %qm.yy = $did(5) 
    var %qm.yyy = $did(8) 
    if (*@* iswm $did(20).seltext) { qme $qma(The host) $+  $+ %qm.yyy $did(19).seltext $qma(has been deleted from the) $& 
      $qmb(Auto Decline List) 1- $qmb(list) $qma(is) $qmb(refreshing) $+  $+ %qm.yy $+ . | qmd b 22,26 } 
    if (*@* !iswm $did(20).seltext) { qme $qma(The nick) $+  $+ %qm.yyy $did(19).seltext $qma(has been deleted from the) $& 
      $qmb(Auto Decline List) 1- $qmb(list) $qma(is) $qmb(refreshing) $+  $+ %qm.yy $+ . | qmd b 22,26 } 
  qmri AD $did(20).seltext | qmlistdoD | unset %qm.y* } 
  elseif ($did == 30) { 
    if ($readini(qm.ini,Other,LOG) == OFF) { qmd b 48,49,50 | qmd r 48 } 
    if ($readini(qm.ini,Other,ALOG) == OFF) { qmd b 36,37,38 | qmd r 36 } 
  if ($readini(qm.ini,Other,ALOG) == ON) { qmd c 33 | qmlistdoAL } } 
  elseif ($did == 32) { 
    if ($did(32).state == 1) { 
      qmi Other LOG ON 
      qmd e 48,49,50 | qmlistdoNL 
    qme $qma(The) $qmb(Normal Logging) $qma(setting is now) $qmb(enabled) $+  $+ $did(5) $+ . } 
    elseif ($did(32).state == 0) { 
      qmi Other LOG OFF 
      qmd b 48,49,50 | qmd r 48 
      qme $qma(The) $qmb(Normal Logging) $qma(setting is now) $qmb(disabled) $+  $+ $did(5) $+ . 
      if ($did(33).state == 0) { qmd h 34 | qmd b 31,32,33 | qmd v 35 
  qmi Other LOGA OFF } } } 
  elseif ($did == 33) { 
    if ($did(33).state == 1) { 
      qmi Other ALOG ON 
      qmd e 36,37,38 | qmlistdoAL 
    qme $qma(The) $qmb(Away Logging) $qma(setting is now) $qmb(enabled) $+  $+ $did(5) $+ . } 
    elseif ($did(33).state == 0) { 
      qmi Other ALOG OFF 
      qmd b 36,37,38 | qmd r 36 
      qme $qma(The) $qmb(Away Logging) $qma(setting is now) $qmb(disabled) $+  $+ $did(5) $+ . 
      if ($did(32).state == 0) { qmd h 34 | qmd b 31,32,33 | qmd v 35 
  qmi Other LOGA OFF } } } 
  elseif ($did == 34) { 
    qmi Other LOGA OFF 
    qme $qma(The) $qmb(whole Logging) $qma(setting is now) $qmb(disabled) $+  $+ $did(5) $+ . 
  qmd h 34 | qmd b 31,32,33 | qmd v 35 } 
  elseif ($did == 35) { 
    qmi other LOGA ON 
    qme $qma(The) $qmb(whole Logging) $qma(setting is now) $qmb(enabled) $+  $+ $did(5) $+ . 
  qmd h 35 | qmd v 34 | qmd e 31,32,33 } 
  elseif ($did == 37) { 
  qme $qma(The) $qmb(Away Log List) $qma(is) $qmb(refreshing) $+  $+ $did(5) $+ . | qmlistdoAL } 
  elseif ($did == 38) { 
    if ($ini(qmalog.ini,MSG,0) == 1) { qme $qma(There is already) $qmb(no) $qma(loggings!) | halt } 
    remini qmalog.ini MSG | writeini qmalog.ini MSG Away Log 
  qme $qma(The) $qmb(Away Log File) $qma(has been) $qmb(deleted) $qma(and) $qmb(remade) $+  $+ $did(5) $+ . | qmlistdoAL } 
  elseif ($did == 44) { 
    set %qm.change.secs $?="Enter Seconds (2 Digits Max)" 
    if ($len(%qm.change.secs) > 2) { qme $qma(No) $qmb(more) $qma(than) $& 
      $+  $+ $did(8) 2 digits $+  $+ $did(5) $+ ! | unset %qm.change.secs | halt } 
    qmi Other SECS %qm.change.secs 
    qmd ra 43 %qm.change.secs | unset %qm.change.secs 
  qme $qma(The) $qmb(Time-Out Seconds Ammount) $qma(has been changed accordingly.) } 
  elseif ($did == 45) { 
    if ($did(45).state == 1) { 
      qmi Other AAA ON 
    qme $qma(The) $qmb(Auto Accept All) $qma(is now) $qmb(enabled) $+  $+ $did(5) $+ . } 
    if ($did(46).state == 1 && $did(45).state == 1) { 
      qmd u 46 | qmri Other ADA 
    qme $qma(The) $qmb(Auto Decline All) $qma(is also) $qmb(disabled) $+  $+ $did(5) $+ . } 
    elseif ($did(45).state == 0) { 
      qmri Other AAA 
  qme $qma(The) $qmb(Auto Accept All) $qma(is now) $qmb(disabled) $+  $+ $did(5) $+ . } } 
  elseif ($did == 46) { 
    if ($did(46).state == 1) { 
      qmi Other ADA ON 
    qme $qma(The) $qmb(Auto Decline All) $qma(is now) $qmb(enabled) $+  $+ $did(5) $+ . } 
    if ($did(45).state == 1 && $did(46).state == 1) { 
      qmd u 45 | qmri Other AAA 
    qme $qma(The) $qmb(Auto Accept All) $qma(is also) $qmb(disabled) $+  $+ $did(5) $+ . } 
    elseif ($did(46).state == 0) { 
      qmri Other ADA 
  qme $qma(The) $qmb(Auto Decline All) $qma(is now) $qmb(disabled) $+  $+ $did(5) $+ . } } 
  elseif ($did == 49) { 
  qme $qma(The) $qmb(Away Log List) $qma(is) $qmb(refreshing) $+  $+ $did(5) $+ . | qmlistdoNL } 
  elseif ($did == 50) { 
    if ($ini(qmlog.ini,MSG,0) == 1) { qme $qma(There is already) $qmb(no) $qma(loggings!) | halt } 
    remini qmlog.ini MSG | writeini qmlog.ini MSG Normal Log 
    qme $qma(The) $qmb(Normal Log File) $qma(has been) $qmb(deleted) $qma(and) $qmb(remade) $+  $+ $did(5) $+ . | qmlistdoNL 
  } 
} 
alias qmlistdoNL { 
  if ($ini(qmlog.ini,MSG,0) == 1) { qmd ra 48 ~ No Messages from Normal Status | halt } 
  set %qm.ldNL.T $calc($ini(qmlog.ini,MSG,0) - 1) 
  set %qm.ldNL.N 1 
  qmd ra 48 -- Your Messages from Normal Status $crlf 
  qmlistdoNLL 
} 
alias qmlistdoNLL { 
  inc %qm.ldNL.N 1 
  if ($calc(%qm.ldNL.N - 2) == %qm.ldNL.T && %qm.ldAL.N != 2) { qmd a 48 -- End | unset %qm.ldNL.* | halt } 
  qmd a 48 ~ $gettok($readini(qmlog.ini,MSG,%qm.ldNL.N),1,42) - $& 
    $gettok($readini(qmlog.ini,MSG,%qm.ldNL.N),2,42) - $gettok($readini(qmlog.ini,MSG,%qm.ldNL.N),3,42) - $crlf 
  qmlistdoNLLL 
} 
alias qmlistdoNLLL { qmlistdoNLL } 
alias qmlistdoAL { 
  if ($ini(qmalog.ini,MSG,0) == 1) { qmd ra 36 ~ No Messages from Away Status | halt } 
  set %qm.ldAL.T $calc($ini(qmalog.ini,MSG,0) - 1) 
  set %qm.ldAL.N 1 
  qmd ra 36 -- Your Messages from Away Status $crlf 
  qmlistdoALL 
} 
alias qmlistdoALL { 
  inc %qm.ldAL.N 1 
  if ($calc(%qm.ldAL.N - 2) == %qm.ldAL.T && %qm.ldAL.N != 2) { qmd a 36 -- End | unset %qm.ldAL.* | halt } 
  qmd a 36 ~ $gettok($readini(qmalog.ini,MSG,%qm.ldAL.N),1,42) - $& 
    $gettok($readini(qmalog.ini,MSG,%qm.ldAL.N),2,42) - $gettok($readini(qmalog.ini,MSG,%qm.ldAL.N),3,42) - $crlf 
  qmlistdoALLL 
} 
alias qmlistdoALLL { qmlistdoALL } 
alias qmlistdoA { 
  if ($ini(qm.ini,AA,0) == 0) { qmd ra 19 ~ No Users On List | halt } 
  set %qm.ldA.T $ini(qm.ini,AA,0) 
  set %qm.ldA.N 0 
  qmd ra 19 ~ Auto Accept Users/Hosts 
  qmlistdoAA 
} 
alias qmlistdoAA { 
  inc %qm.ldA.N 1 
  if ($calc(%qm.ldA.N - 1) == %qm.ldA.T) { 
    if (%qm.ldB == on) qmlistdoD 
  qmd a 19 ~ End | unset %qm.ldA.* | halt } 
  qmd a 19 $ini(qm.ini,AA,%qm.ldA.N) 
  qmlistdoAAA 
} 
alias qmlistdoAAA { qmlistdoAA } 
alias qmlistdoB { 
  if ($ini(qm.ini,AA,0) == 0 && $ini(qm.ini,AD,0) == 0) { qmd ra 19 ~ No Users On List 
  qmd ra 20 ~ No Users On List | halt } 
  if ($ini(qm.ini,AA,0) == 0 && $ini(qm.ini,AD,0) != 0) { qmd ra 19 ~ No Users On List 
  qmlistdoD | halt } 
  if ($ini(qm.ini,AA,0) != 0 && $ini(qm.ini,AD,0) == 0) { qmd ra 20 ~ No Users On List 
  qmlistdoA | halt } 
  set %qm.ldA.T $ini(qm.ini,AA,0) 
  set %qm.ldA.N 0 
  set %qm.ldB on 
  qmd ra 19 ~ Auto Accept Users/Hosts 
  qmlistdoAA 
} 
alias qmlistdoD { 
  if ($ini(qm.ini,AD,0) == 0) { qmd ra 20 ~ No Users On List | halt } 
  set %qm.ldD.T $ini(qm.ini,AD,0) 
  set %qm.ldD.N 0 
  qmd ra 20 ~ Auto Decline Users/Hosts 
  qmlistdoDD 
} 
alias qmlistdoDD { 
  inc %qm.ldD.N 1 
  if ($calc(%qm.ldD.N - 1) == %qm.ldD.T && %qm.ldB == on) { qmd a 20 ~ End 
  qmd a 19 ~ End | unset %qm.ldD.* | unset %qm.ldB | halt } 
  if ($calc(%qm.ldD.N - 1) == %qm.ldD.T) { qmd a 20 ~ End | unset %qm.ldD.* | halt } 
  qmd a 20 $ini(qm.ini,AD,%qm.ldD.N) 
  qmlistdoDDD 
} 
alias qmlistdoDDD { qmlistdoDD } 
alias qmgm { return $readini(qm.ini,MSG,$1) } 
dialog qmcolorhelp { 
  option dbu 
  size -1 -1 100 140 
  title "Adding Message Color" 
  edit "", 1, 5 5 90 103, multi 
  button "Close", 2, 30 114 30 14, ok 
} 
on *:dialog:qmcolorhelp:init:0:{ 
  did -m $dname 1 
  qmcolorhelpreturn 
} 
alias qmcolorhelpreturn { 
  did -ra qmcolorhelp 1 To put color into the Query Manager Messages, read this: $crlf 
  did -a qmcolorhelp 1 Use the normal color coding for mIRC: ctrl+kNumber1-15 $crlf 
  did -a qmcolorhelp 1 Clicking cntrl+k will bring up a box like this:  $crlf 
  did -a qmcolorhelp 1 Then type a number 1-15 (0 is white). $crlf 
  did -a qmcolorhelp 1 Example: $crlf 
  did -a qmcolorhelp 1 14Follow this 2guide14 to 2help14 you learn how to type in 2color $& 
    14with the 2mIRC Color Codes14! 
  did -a qmcolorhelp 1 Well, hope this helped! Click the "Close" button to exit. 
} 
########################################################################################################################################### 
########################################################## End of Query Manager ########################################################### 
###########################################################################################################################################