Simple Query Manager

By Cados on Nov 19, 2010

It activates when someone opens a query with you.

on 1:OPEN:?:*:{
  set %query.nick $nick
  set %query.address $address($nick,1)
  set %query.text $1-
  close -m $nick
  .msg $nick Query Control: Please wait as I decide to accept or deny your query request.
  query.decide
}
alias -l query.decide {
  dialog -m Query Query
}
dialog Query {
  title "Query"
  size 300 250 200 50
  option dbu
  text "Nick:", 2, 5 12 12 10, nowrap
  text "Text:", 3, 5 22 12 10, nowrap
  edit %query.nick %query.address, 4, 20 10 170 10, read
  edit %query.text, 5, 20 20 170 10, read
  button "Accept", 6, 25 32 40 15
  button "Decline", 7, 75 32 40 15
  button "Ignore", 8, 125 32 40 15
}
on 1:dialog:Query:*:* {
  if ($devent == sclick) {
    if ($did == 6) {
      dialog -x Query Query
      query %query.nick
      echo -t %query.nick < $+ %query.nick $+ > %query.text
      .msg %query.nick Query Control: Your query has been accepted.
      unset %query.*
    }
    if ($did == 7) {
      dialog -x Query Query
      .msg %query.nick Query Control: Your query has been denied.
      unset %query.*
    }
    if (#did == 8) {
      dialog -x Query Query
      ignore -p %query.nick
      .msg %query.nick Query Control: Your query has been denied and you have been ignored.
      unset %query.*
    }
  }
}

Comments

Sign in to comment.
Fuzionx   -  Nov 19, 2010
if (#did == 8) {

Has to be
if ($did == 8) {
I guess ^^

Beside that, nice script :)

 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.