dialog qc { title "Query Control" size -1 -1 140 51 option dbu edit "", 3, 4 10 132 10, read text "From:", 5, 4 24 14 8 edit "", 7, 20 22 116 10, read 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:qc:sclick:1:{ /window -w %qnick /msg %qnick $ewrap(Query Accepted) /dialog -x qc /window -a %qnick /unset %qnick } on *:dialog:qc:sclick:2:{ close -m %qnick /msg %qnick $ewrap(Query Declined) /dialog -x qc unset %qnick } on *:OPEN:?: { if ($dialog(qc)) { .msg $nick $ewrap(Sorry $nick $+ , but I am busy with another message. Please try again later.) close -m $nick } else { /set %qnick $nick /window -h %qnick /msg %qnick $ewrap(Please wait for me to accept your PM) /dialog -m qc qc did -a qc 7 %qnick did -a qc 3 $1- } } alias ewrap { var %msg var %tok = 1 var %word while ($gettok($1-,%tok,32) != $null) { %word = $gettok($1-,%tok,32) %msg = %msg 15 $+ $upper($left(%word,1)) $+ 15 $+ $right(%word,-1) inc %tok } return 12,1(15 $+ %msg $+ 12) }