Query Manager

By G13AoUsTiS on Jan 06, 2008

I was bored and i created this simple query acceptor. Comments please:)

on *:load: { /set %accmsg $$?="Type Your Query Accepted Message" | /set %dismsg $$?="Type Your Query Dislined Message" | /set %bumsg $$?="Type Your Query Busy Message" | /echo -a 2* Thank You For Loading The Query Manager By G13AoUsTiS }       
dialog Qman {
  title "Query Manager"
  size -1 -1 126 190
  option dbu
  text "Query Manager By G13AoUsTiS", 1, 19 4 95 8, disable center
  box "Query Accept/Desline", 2, 9 19 111 40
  check "ON", 3, 34 31 50 10
  check "OFF", 4, 35 44 50 10
  box "Busy Mode", 5, 10 65 108 40
  check "ON", 6, 35 77 50 10
  check "OFF", 7, 35 91 50 10
  text "Accept Message", 8, 4 117 42 8, center
  edit %accmsg, 9, 48 116 71 10, autohs
  text "Desline Message", 10, 4 131 42 8, center
  edit %dismsg, 11, 48 130 71 10, autohs
  text "Busy Message", 12, 4 143 42 8, center
  edit %bumsg, 13, 48 142 71 10, autohs
  button "OK", 14, 14 163 37 12, ok
  button "Cancel", 15, 76 162 37 12, cancel
}

on *:dialog:qman:sclick:*: {
  if ($did == 3) { /set %qman on }
  if ($did == 4) { /set %qman off }
  if ($did == 6) { /set %bmode on }
  if ($did == 7) { /set %bmode off }
}

on *:dialog:qman:edit:*: {
  if ($did == 9) { /set %accmsg $did(qman,9) }
  if ($did == 11) { /set %dismsg $did(qman,11) }
  if ($did == 13) { /set %bumsg $did(qman,13) }
}

on *:OPEN:?: {
  if (%qman == on) && (%bmode == off) { 
    .msg $nick Please Wait While I Am Checking Your Query...
    set %nnick $nick
    set %naddress $fulladdress
    set %nmsg $1-
    dialog -m qaccde qaccde
  }
  if (%bmode == on) { .msg $nick %bumsg }
}

dialog qaccde {
  title "Accept - Desline"
  size -1 -1 145 90
  option dbu
  text "NickName", 1, 6 7 26 8, center
  edit %nnick, 2, 37 6 100 10, disable
  text "FullAddress", 3, 5 17 28 8, center
  edit %naddress, 4, 37 16 100 10, disable
  text "Message", 5, 5 28 25 8, center
  edit %nmsg, 6, 35 28 105 35, disable
  button "Accept", 7, 28 69 37 12
  button "Desline", 8, 91 69 37 12
}

on *:dialog:qaccde:sclick:*: {
  if ($did == 7) { .msg %nnick %accmsg | /unset %nnick | /unset %naddress | /unset %nmsg | /dialog -x qaccde }
  if ($did == 8) { .msg %nnick %dismsg | /unset %nnick | /unset %naddress | /unset %nmsg | /dialog -x qaccde }
}

menu channel {
-
Query Manager: /dialog -m qman qman
}

Comments

Sign in to comment.
[DX]   -  Jan 06, 2008

No need for / here and other places

on *:dialog:qaccde:sclick:*: {
  if ($did == 7) { .msg %nnick %accmsg | /unset %nnick | /unset %naddress | /unset %nmsg | /dialog -x qaccde }
  if ($did == 8) { .msg %nnick %dismsg | /unset %nnick | /unset %naddress | /unset %nmsg | /dialog -x qaccde }
}

just

on *:dialog:qaccde:sclick:*: {
  if ($did == 7) { .msg %nnick %accmsg | unset %nnick | unset %naddress | unset %nmsg | dialog -x qaccde }
  if ($did == 8) { .msg %nnick %dismsg | unset %nnick | unset %naddress | unset %nmsg | dialog -x qaccde }
}
 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.