Advertisement
SaNCaK

mIRC Query Control

Apr 19th, 2014
463
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.88 KB | None | 0 0
  1. dialog QueryBlocker {
  2.   title "Query Control"
  3.   size -1 -1 172 54
  4.   option dbu
  5.   button "Accept", 1, 24 37 37 12
  6.   button "Decline", 2, 67 37 37 12
  7.   button "Ignore", 3, 110 37 37 12
  8.   text "", 4, 24 5 123 28
  9.   text "V1.0", 5, 159 46 13 8, disable
  10. }
  11. menu Status,Channel,MenuBar,Query {
  12.   -
  13.   $iif($group(#qc) == on,$style(1)Disable,$style(0)Enable) Use Query Control: {
  14.     var %status = $iif($group(#qc) == on,Disable,Enable)
  15.     $+(.,%status) #qc
  16.     echo -ta 14Query control has been04 $+(%status,d,14.)
  17.   }
  18.   -
  19. }
  20. menu Query {
  21.   $iif($hget(QueryBlocker,$address($active,3)),$style(1),$style(0)) Auto-Accept queries from $active: {
  22.     var %status = $iif($hget(QueryBlocker,$address($active,3)) = 1,Del,Add)
  23.     $+(h,%status) QueryBlocker $address($active,3) 1
  24.     echo -ta $+(04,$active) 14 has been04 $iif(%status = del,deleted from,added to) 14Auto-Accept.
  25.   }
  26. }
  27.  
  28. #qc on
  29. on *:OPEN:?:{
  30.   %QC.nick.address = $address($nick,3)
  31.   %QC.nick = $nick
  32.   if ($hget(QueryBlocker,%QC.nick.address)) {
  33.     .msg $nick PM Auto-Accepted. $iif($away,I may not reply as I am currently away.)
  34.     echo -ta 14Query Control: 04Auto-Accept from ' $+ $nick $+ '.
  35.   }
  36.   elseif (!$hget(QueryBlocker,%QC.nick.address)) {
  37.     if ($dialog(QueryBlocker)) { .msg $nick I currently have a que of PMs. If this is important please try again later or send me a memo. /ms send $me yourmessage | halt }
  38.     window -h $nick
  39.     .msg $nick Please wait for your query to be accepted/declined.
  40.     dialog -mo QueryBlocker QueryBlocker
  41.     did -ra QueryBlocker 4 %QC.nick ( $+ %QC.nick.address $+ ) has PMed you. Do you want to accept, decline or ignore?
  42.   }
  43. }
  44. on *:exit:{
  45.   hsave -s QueryBlocker QueryBlocker.hsh
  46. }
  47. on *:start:{
  48.   hmake QueryBlocker 100
  49.   if ($exists(QueryBlocker.hsh)) {
  50.     hload -s QueryBlocker QueryBlocker.hsh
  51.   }
  52. }
  53. #qc end
  54. on *:dialog:QueryBlocker:sclick:1:{
  55.   window -w %QC.nick
  56.   window -a %QC.nick
  57.   .msg %QC.nick I have accepted you PM. You do not have to repeat your last message as I can see it already. $iif($away,I may not reply as I am currently away.)
  58.   dialog -x QueryBlocker
  59.   if ($?!"Do you want to add this user ( $+ %QC.nick $+ ) to your auto-accept list?") addexc %QC.nick.address
  60.   unset %QC.nick
  61. }
  62. on *:dialog:QueryBlocker:sclick:2:{
  63.   .msg %QC.nick I have declined your Private Message. A 2 minute ignore has been put on your nick for private messages to prevent abuse.
  64.   .ignore -pu120 %QC.nick
  65.   close -m %QC.nick
  66.   dialog -x QueryBlocker
  67.   unset %QC.*
  68. }
  69. on *:dialog:QueryBlocker:sclick:3:{
  70.   msg %QC.nick Private Message Declined. You have been ignored.
  71.   .ignore -pu1200 %QC.nick.address
  72.   close -m %QC.nick
  73.   dialog -x QueryBlocker
  74.   unset %QC.*
  75. }
  76. alias addexc {
  77.   if (!$hget(QueryBlocker)) hmake QueryBlocker 100
  78.   hadd QueryBlocker %QC.nick.address 1
  79.   echo -ta 14Query Control:04 Added ' $+ $address(%QC.nick,3) $+ ' to auto-accept list.
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement