All pastes #819284 Raw Edit

Stuff

public text v1 · immutable
·published 2007-12-16 21:41 UTC
rendered paste body
dialog Query {
  title "Query Controler"
  size -1 -1 140 51
  option dbu
  edit "", 3, 4 10 132 10, read autohs
  text "From:", 5, 4 24 14 8
  edit "", 7, 20 22 116 10, read autohs
  button "Accept", 1, 5 34 37 12, flat
  button "Decline", 2, 44 34 37 12, flat
  box "Query Control", 4, 1 1 138 49
}
on *:DIALOG:Query:sclick:1:{
  .msg %q.nick 7»14Your query has been accepted7«
  dialog -x Query | query %q.nick | echo %q.nick %q.ts %q.nick -> %q.msg
  unset %q.*
}
on *:DIALOG:Query:sclick:2:{
  .msg %q.nick 7»14Your query has been declined7«
  dialog -x Query
  unset %q.*
}
on ^*:open:?:*:{
  if (%qb == on) && (-*BNC !iswm $nick) {
    if ($dialog(Query)) { x $nick | halt }
    set %q.nick $nick | set %q.msg $1- | set %q.ts $timestamp
    .msg $nick 7»14Please wait for your query to be accepted or declined7«
    dialog -ma Query Query | did -a Query 7 %q.nick
    did -a Query 3 %q.msg | halt
  }
}
alias -l x { .msg $1 5Please Wait.... Thank you. | .timer 1 .5 close -m $1 }
menu channel,query,nicklist {
  $iif(%qb == on,$style(1)) Query Blocker: $iif(%qb == on,set %qb off,set %qb on)
}